Re: [RFC] [PATCH] Adding ctrl-o sysrq hack support to 8250 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 07, 2005 at 11:22:46PM +0100, Olaf Hering wrote:
>  On Tue, Dec 06, Russell King wrote:
> 
> > I'm still highly concerned about this whole idea.  Applying this patch
> > _will_ without doubt inconvenience a lot of people who expect ^O to be
> > received as normal.
> 
> If one boots with 'console=ttyS0', the 'ctrl o' should be handled only
> on ttyS0. However, I'm not sure if anyone uses ^O in this situation via
> the system console. In our case, ttyS0 is automatically activated via
> add_preferred_console in arch/powerpc/kernel/setup-common.c.
> If there is a clever way to handle ^O only for the system console, would
> such a patch be accepted? I'm currently looking through the code to see
> how it could be done.

Easily.  Have a look at the internals of uart_handle_break() in
include/linux/serial_core.h

However, please be aware that ^O is the default control character for
"flush output" which I think is something you may want to use with a
serial console.  Eg:

speed 38400 baud; rows 0; columns 0; line = 1;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
            ^^^^^^^^^^^

Hence it's a poor choice.  Maybe picking a character which isn't
already used by default for another purpose would be appropriate?
'^]', the classic telnet escape character maybe?

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux