shithub: 9ferno

Download patch

ref: 1daffb595e063fdfb42da7ee86d202d5055bd0a1
parent: b1df88a7857cdf816c5183db10d1a24caac5484b
author: 9ferno <gophone2015@gmail.com>
date: Sun Aug 8 21:25:57 EDT 2021

minor changes to get devcons working neatly

--- a/os/pc/devkbd.c	Sun Aug  8 17:27:26 2021
+++ b/os/pc/devkbd.c	Sun Aug  8 21:25:57 2021
@@ -229,6 +229,7 @@
 
 	b = c & 0xff;
 	qproduce(kbd.q, &b, 1);
+	/* print("i8042intr b %d %c 0x%x\n", b, b, b); */
 	kbdprocesschar(b); /* hack until kbdfs is built */
 }
 
--- a/os/port/devcons.c	Sun Aug  8 17:27:26 2021
+++ b/os/port/devcons.c	Sun Aug  8 21:25:57 2021
@@ -161,10 +161,11 @@
 	 *  put the message there.
 	 */
 	wq = usewrite && islo() ? qwrite : qiwrite;
-	if(kprintoq != nil && !qisclosed(kprintoq))
+	if(kprintoq != nil && !qisclosed(kprintoq)){
 		(*wq)(kprintoq, str, n);
-	else if(screenputs != nil)
+	}else if(screenputs != nil){
 		screenputs(str, n);
+	}
 
 	if(serialoq == nil){
 		uartputs(str, n);
@@ -1005,9 +1006,7 @@
         if(kbd.raw)
                 return;
 
-        if(r == '\n'){
-				putstrn("\r", 1);
-        } else if(r == 0x15){
+        if(r == 0x15){
                 buf = "^U\n";
                 n = 3;
         }