refactor: add a simple ramfs for rootfs. Twifs should have more specific job in future.
[lunaix-os.git] / lunaix-os / kernel / spike.c
index 5aa0137421a7e5249aa4b51e8c5ea1d1a69ef044..87726b01fce4ab150fbc6f4f82513019577119b1 100644 (file)
@@ -24,3 +24,15 @@ panick(const char* msg)
     asm("int %0" ::"i"(LUNAIX_SYS_PANIC), "D"(msg));
     spin();
 }
     asm("int %0" ::"i"(LUNAIX_SYS_PANIC), "D"(msg));
     spin();
 }
+
+void
+panickf(const char* fmt, ...)
+{
+    va_list args;
+    va_start(args, fmt);
+    __sprintf_internal(buffer, fmt, 1024, args);
+    va_end(args);
+
+    asm("int %0" ::"i"(LUNAIX_SYS_PANIC), "D"(buffer));
+    spin();
+}