Browse Source

init: don't actually open serial by default

K. Lange 2 years ago
parent
commit
26801b76fd
1 changed files with 3 additions and 12 deletions
  1. 3 12
      apps/init.c

+ 3 - 12
apps/init.c

@@ -44,18 +44,9 @@
 
 /* Initialize fd 0, 1, 2 */
 void set_console(void) {
-	/* default to /dev/ttyS0 (serial COM1) */
-	int _stdin  = syscall_open("/dev/ttyS0", 0, 0);
-	if (_stdin < 0) {
-		/* if /dev/ttyS0 failed to open, fall back to /dev/null */
-		syscall_open("/dev/null", 0, 0);
-		syscall_open("/dev/null", 1, 0);
-		syscall_open("/dev/null", 1, 0);
-	} else {
-		/* otherwise also use /dev/ttyS0 for stdout, stderr */
-		syscall_open("/dev/ttyS0", 1, 0);
-		syscall_open("/dev/ttyS0", 1, 0);
-	}
+	syscall_open("/dev/null", 0, 0);
+	syscall_open("/dev/null", 1, 0);
+	syscall_open("/dev/null", 1, 0);
 }
 
 /* Run a startup script and wait for it to finish */