diff options
author | dd <dd@FreeBSD.org> | 2001-05-27 00:45:59 +0000 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2001-05-27 00:45:59 +0000 |
commit | f5638c42a681d28ab2299c163004fe84b9d9641a (patch) | |
tree | cb9b5b6343fc7a4db16f5c956e5a546c9a37610b /sys/dev/syscons | |
parent | 8538c8f1d7ea6149f232c4cb147a5821601e7831 (diff) | |
download | FreeBSD-src-f5638c42a681d28ab2299c163004fe84b9d9641a.zip FreeBSD-src-f5638c42a681d28ab2299c163004fe84b9d9641a.tar.gz |
Add a CONS_CLRHIST ioctl which instructs syscons to clear the history
(scroll-back) buffer.
PR: 27616
Reviewed by: ru
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r-- | sys/dev/syscons/schistory.c | 6 |
1 files changed, 6 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; |