Add a CONS_CLRHIST ioctl which instructs syscons to clear the history

(scroll-back) buffer.

PR:		27616
Reviewed by:	ru
This commit is contained in:
dd 2001-05-27 00:45:59 +00:00
parent 8538c8f1d7
commit f5638c42a6
2 changed files with 9 additions and 0 deletions

View File

@ -299,6 +299,12 @@ sc_hist_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag,
DPRINTF(5, ("error:%d, rows:%d, pool:%d\n", error,
sc_vtb_rows(scp->history), extra_history_size));
return error;
case CONS_CLRHIST:
scp = SC_STAT(tp->t_dev);
sc_vtb_clear(scp->history, scp->sc->scr_map[0x20],
SC_NORM_ATTR << 8);
return 0;
}
return ENOIOCTL;

View File

@ -116,6 +116,9 @@ typedef struct ssaver ssaver_t;
/* set the history (scroll back) buffer size (in lines) */
#define CONS_HISTORY _IOW('c', 9, int)
/* clear the history (scroll back) buffer */
#define CONS_CLRHIST _IO('c', 10)
/* mouse cursor ioctl */
struct mouse_data {
int x;