aboutsummaryrefslogtreecommitdiff
path: root/libc/print.c
diff options
context:
space:
mode:
authorMarvin Borner2021-02-26 14:51:13 +0100
committerMarvin Borner2021-02-26 14:51:13 +0100
commit0f00932955521c3c2fb8140176ab72f22172c298 (patch)
tree99561c0254d14c0c3536f900ee83b0341a5c8a1b /libc/print.c
parentdec16faf32e75d613e20cac175b8a0c2d3612b94 (diff)
Started UBSan and stack-smashing check support
Diffstat (limited to 'libc/print.c')
-rw-r--r--libc/print.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/print.c b/libc/print.c
index 6d97599..3f6c1cd 100644
--- a/libc/print.c
+++ b/libc/print.c
@@ -213,14 +213,18 @@ int print(const char *str)
return strlen(str);
}
+#endif
+
void panic(const char *format, ...)
{
va_list ap;
va_start(ap, format);
+#ifdef kernel
vprintf(format, ap);
+#else
+ vfprintf(PATH_ERR, format, ap);
+#endif
va_end(ap);
assert(0);
}
-
-#endif