Mercurial > illumos > illumos-gate
changeset 2956:1940b23c5e82
6477070 Multiple console connections to same guest toggle read/write state if tilde sequences are used.
author | dtse |
---|---|
date | Fri, 20 Oct 2006 16:03:03 -0700 |
parents | 2aef90ea300f |
children | a3f9fceeda60 |
files | usr/src/cmd/vntsd/cmd.c |
diffstat | 1 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/vntsd/cmd.c Fri Oct 20 14:57:20 2006 -0700 +++ b/usr/src/cmd/vntsd/cmd.c Fri Oct 20 16:03:03 2006 -0700 @@ -108,9 +108,14 @@ * in the group queue. */ static int -console_forward(void) +console_forward(vntsd_client_t *clientp) { - return (VNTSD_STATUS_MOV_CONS_FORWARD); + /* forward when there are mutiple consoles in the group */ + if (clientp->cons->group->num_cons > 1) + return (VNTSD_STATUS_MOV_CONS_FORWARD); + + return (VNTSD_STATUS_CONTINUE); + } /* @@ -118,9 +123,14 @@ * console in the group queue. */ static int -console_backward(void) +console_backward(vntsd_client_t *clientp) { - return (VNTSD_STATUS_MOV_CONS_BACKWARD); + /* backward when there are mutiple consoles in the group */ + if (clientp->cons->group->num_cons > 1) + return (VNTSD_STATUS_MOV_CONS_BACKWARD); + + return (VNTSD_STATUS_CONTINUE); + } /* acquire_write() - acquire write access to a console. */