Adds a 't' command to the menu of con(1) that sends a ^t^t sequence to the remote. This makes it easier to type debug sequences to a remote kernel without affecting your local system. Reference: /n/sources/patch/con-ctl-t-s Date: Thu Apr 25 11:02:54 CES 2013 Signed-off-by: nemo@lsub.org --- /sys/src/cmd/con/con.c Thu Apr 25 11:01:34 2013 +++ /sys/src/cmd/con/con.c Thu Apr 25 11:01:31 2013 @@ -302,7 +302,7 @@ /* * control menu */ -#define STDHELP "\t(b)reak, (q)uit, (i)nterrupt, toggle printing (r)eturns, (.)continue, (!cmd)\n" +#define STDHELP "\t(b)reak, (q)uit, (i)nterrupt, toggle printing (r)eturns, (.)continue, (!cmd), (t)^T^T\n" int menu(int net) @@ -345,6 +345,12 @@ break; case 'r': returns = 1-returns; + done = 1; + break; + case 't': + write(net, "", 2); + if(buf[1] != '\n' && buf[1] != 0) + write(net, buf+1, 1); done = 1; break; default: --- /sys/man/1/con Thu Apr 25 11:01:38 2013 +++ /sys/man/1/con Thu Apr 25 11:01:36 2013 @@ -176,6 +176,18 @@ .TP .B r Toggle printing of carriage returns. +.TP +.B t +Send a +.LR ^T^T +sequence to the network connection. To use +.IR cons (3) +debugging requests on the remote system. If a char is +typed after the +.LR t +it is sent after the +.LR ^T^T +sequence. .PD .PP .I Telnet