summaryrefslogtreecommitdiff
path: root/src/init/stdlib.c
diff options
context:
space:
mode:
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++;