From: John Hodge Date: Sat, 31 May 2014 05:59:06 +0000 (+0800) Subject: Kernel/serial - Debugging added (disabled) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=741122d873eaad95aba1eebb8458b154f94ece28;p=tpg%2Facess2.git Kernel/serial - Debugging added (disabled) --- diff --git a/KernelLand/Kernel/drv/pty.c b/KernelLand/Kernel/drv/pty.c index 3b30b996..d6713f9c 100644 --- a/KernelLand/Kernel/drv/pty.c +++ b/KernelLand/Kernel/drv/pty.c @@ -810,6 +810,8 @@ int PTY_IOCtl(tVFS_Node *Node, int ID, void *Data) int is_server = !pty || Node == pty->ServerNode; + LOG("(%i,%p) %s", ID, Data, (is_server?"Server":"Client")); + switch(ID) { case DRV_IOCTL_TYPE: return DRV_TYPE_TERMINAL; diff --git a/KernelLand/Kernel/drv/serial.c b/KernelLand/Kernel/drv/serial.c index bc7597e4..df13fc73 100644 --- a/KernelLand/Kernel/drv/serial.c +++ b/KernelLand/Kernel/drv/serial.c @@ -5,6 +5,7 @@ * drv/serial.c * - Common serial port code */ +#define DEBUG 0 #include #include #include @@ -65,6 +66,7 @@ tSerialPort *Serial_CreatePort(tSerial_OutFcn output, void *handle) void Serial_ByteReceived(tSerialPort *Port, char Ch) { + LOG("Port=%p,Ch=%i", Port, Ch); if( !Port ) return ; if( Port == gSerial_KernelDebugPort ) @@ -109,6 +111,7 @@ void Serial_ByteReceived(tSerialPort *Port, char Ch) } if( Ch == '\r' ) Ch = '\n'; + LOG("Dispatch to PTY"); PTY_SendInput(Port->PTY, &Ch, 1); }