summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>1997-01-30 15:12:17 +0000
committersos <sos@FreeBSD.org>1997-01-30 15:12:17 +0000
commit902c1eaf5a52164739beb9bbe558b253226a3c75 (patch)
tree3f676e4cae6aa88e182a62471c49896a7ac86304 /sys
parent15cf4c9cd142efa8109613f7b2a3e69a61140044 (diff)
downloadFreeBSD-src-902c1eaf5a52164739beb9bbe558b253226a3c75.zip
FreeBSD-src-902c1eaf5a52164739beb9bbe558b253226a3c75.tar.gz
Fixed the "switch to next screen" command (normally bound to the
key "print scrn". It used to stop at the first non-open vty, now it skips the non-open ones and thereby enable one to cycle around all open vty by pressing "print scrn".
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/syscons/syscons.c11
-rw-r--r--sys/i386/isa/syscons.c11
-rw-r--r--sys/isa/syscons.c11
3 files changed, 30 insertions, 3 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 7c6a532..f08197b 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -3018,7 +3018,16 @@ next_code:
metas = 1;
break;
case NEXT:
- switch_scr(cur_console, (get_scr_num() + 1) % MAXCONS);
+ {
+ int next, this = get_scr_num();
+ for (next = this+1; next != this; next = (next+1)%MAXCONS) {
+ struct tty *tp = VIRTUAL_TTY(next);
+ if (tp->t_state & TS_ISOPEN) {
+ switch_scr(cur_console, next);
+ break;
+ }
+ }
+ }
break;
case BTAB:
return(BKEY);
diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c
index 7c6a532..f08197b 100644
--- a/sys/i386/isa/syscons.c
+++ b/sys/i386/isa/syscons.c
@@ -3018,7 +3018,16 @@ next_code:
metas = 1;
break;
case NEXT:
- switch_scr(cur_console, (get_scr_num() + 1) % MAXCONS);
+ {
+ int next, this = get_scr_num();
+ for (next = this+1; next != this; next = (next+1)%MAXCONS) {
+ struct tty *tp = VIRTUAL_TTY(next);
+ if (tp->t_state & TS_ISOPEN) {
+ switch_scr(cur_console, next);
+ break;
+ }
+ }
+ }
break;
case BTAB:
return(BKEY);
diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c
index 7c6a532..f08197b 100644
--- a/sys/isa/syscons.c
+++ b/sys/isa/syscons.c
@@ -3018,7 +3018,16 @@ next_code:
metas = 1;
break;
case NEXT:
- switch_scr(cur_console, (get_scr_num() + 1) % MAXCONS);
+ {
+ int next, this = get_scr_num();
+ for (next = this+1; next != this; next = (next+1)%MAXCONS) {
+ struct tty *tp = VIRTUAL_TTY(next);
+ if (tp->t_state & TS_ISOPEN) {
+ switch_scr(cur_console, next);
+ break;
+ }
+ }
+ }
break;
case BTAB:
return(BKEY);
OpenPOWER on IntegriCloud