summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/apple.c2
-rw-r--r--user/include/stdio.h2
-rw-r--r--user/lib/fwrite.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/user/apple.c b/user/apple.c
index 000718c..5adafe8 100644
--- a/user/apple.c
+++ b/user/apple.c
@@ -44,7 +44,7 @@ int main(void)
printf("all your apple belong to bad\n");
if (drm((void **)&fb, &width, &height, &bpp)) {
- printf("failure!\n");
+ fprintf(stderr, "failure!\n");
return 1;
}
diff --git a/user/include/stdio.h b/user/include/stdio.h
index 2e2abf4..fe29c9d 100644
--- a/user/include/stdio.h
+++ b/user/include/stdio.h
@@ -23,8 +23,10 @@ typedef void FILE;
extern FILE *stdin;
extern FILE *stdout;
+extern FILE *stderr;
#define stdin stdin
#define stdout stdout
+#define stderr stderr
/**
* Get a char from stdin
diff --git a/user/lib/fwrite.c b/user/lib/fwrite.c
index aa828e0..515d4ff 100644
--- a/user/lib/fwrite.c
+++ b/user/lib/fwrite.c
@@ -2,6 +2,7 @@
#include <unistd.h>
FILE *stdout = (void *)1;
+FILE *stderr = (void *)2;
int putchar(int c)
{