Merge branch 'master' into isa/arm64
[lunaix-os.git] / lunaix-os / tests / units / stubs / syslog.c
diff --git a/lunaix-os/tests/units/stubs/syslog.c b/lunaix-os/tests/units/stubs/syslog.c
new file mode 100644 (file)
index 0000000..0531625
--- /dev/null
@@ -0,0 +1,25 @@
+#include <lunaix/syslog.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void
+kprintf_m(const char* component, const char* fmt, va_list args)
+{
+    int sz = 0;
+    char buff[1024];
+    
+    sz = vsnprintf(buff, 1024, fmt, args);
+    printf("%s: %s\n", component, buff);
+}
+
+void
+kprintf_v(const char* component, const char* fmt, ...)
+{
+    va_list args;
+
+    va_start(args, fmt);
+
+    kprintf_m(component, fmt, args);
+
+    va_end(args);
+}
\ No newline at end of file