direct-io.hg

changeset 14348:f9fbcc354daa

The Xen console intercepts ^O and prevents it from propagating
through to the guest. However, ^O is a useful key in bash and in
Emacs. This patch changes the console to pass a single ^O
through to the guest when it is pressed twice.

Signed-off-by: Ben Pfaff <blp@cs.stanford.edu>
author kfraser@localhost.localdomain
date Mon Mar 12 11:04:34 2007 +0000 (2007-03-12)
parents 94fcbb52bde2
children 1721f90e1422
files linux-2.6-xen-sparse/drivers/xen/console/console.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/console/console.c	Mon Mar 12 11:03:07 2007 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c	Mon Mar 12 11:04:34 2007 +0000
     1.3 @@ -348,8 +348,11 @@ void xencons_rx(char *buf, unsigned len,
     1.4  #ifdef CONFIG_MAGIC_SYSRQ
     1.5  		if (sysrq_enabled) {
     1.6  			if (buf[i] == '\x0f') { /* ^O */
     1.7 -				sysrq_requested = jiffies;
     1.8 -				continue; /* don't print the sysrq key */
     1.9 +				if (!sysrq_requested) {
    1.10 +					sysrq_requested = jiffies;
    1.11 +					continue; /* don't print sysrq key */
    1.12 +				}
    1.13 +				sysrq_requested = 0;
    1.14  			} else if (sysrq_requested) {
    1.15  				unsigned long sysrq_timeout =
    1.16  					sysrq_requested + HZ*2;