summaryrefslogtreecommitdiff
path: root/src/init/stdlib.c
diff options
context:
space:
mode:
authordzwdz2022-04-07 23:13:00 +0200
committerdzwdz2022-04-07 23:13:00 +0200
commit6152d11ae205d4b4a9f03574cfcb0c24cb54b4b5 (patch)
treeed8ddd0e03f6a730e396cb2877517d05d3954fd7 /src/init/stdlib.c
parentab74da4bfff9d37b7b5f5f98bda7edfc2ebc3ea6 (diff)
init: two concurrent shells - serial & vga/ps2
Diffstat (limited to 'src/init/stdlib.c')
-rw-r--r--src/init/stdlib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/init/stdlib.c b/src/init/stdlib.c
index 839b8f5..095be2e 100644
--- a/src/init/stdlib.c
+++ b/src/init/stdlib.c
@@ -2,7 +2,8 @@
#include <shared/syscalls.h>
#include <stdarg.h>
-int __tty_fd;
+int __stdin = -1;
+int __stdout = -1;
int printf(const char *fmt, ...) {
@@ -10,7 +11,7 @@ int printf(const char *fmt, ...) {
int total = 0;
va_list argp;
va_start(argp, fmt);
- if (__tty_fd < 0) return 0;
+ if (__stdout < 0) return 0;
for (;;) {
char c = *fmt++;