summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/syscons/schistory.c6
-rw-r--r--sys/sys/consio.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/syscons/schistory.c b/sys/dev/syscons/schistory.c
index 1c5f154..bd9b1d2 100644
--- a/sys/dev/syscons/schistory.c
+++ b/sys/dev/syscons/schistory.c
@@ -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;
diff --git a/sys/sys/consio.h b/sys/sys/consio.h
index 5cb599a..1915c7e 100644
--- a/sys/sys/consio.h
+++ b/sys/sys/consio.h
@@ -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;
OpenPOWER on IntegriCloud