summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-04-28 11:07:15 -0400
committerFreya Murphy <freya@freyacat.org>2025-04-28 11:07:15 -0400
commit55beb3f2985c9fda15f015320d1b9c723c97fbe0 (patch)
tree2caa9f56ac2d16cf3d6865473888ba9ecf50cafc /user
parentseperate interrupt stack (diff)
downloadcomus-55beb3f2985c9fda15f015320d1b9c723c97fbe0.tar.gz
comus-55beb3f2985c9fda15f015320d1b9c723c97fbe0.tar.bz2
comus-55beb3f2985c9fda15f015320d1b9c723c97fbe0.zip
add stderr
Diffstat (limited to 'user')
-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)
{