> compile NEMU

221220000 张三
Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 23:11:19 up 2 days, 11:35,  3 users,  load average: 0.25, 0.23, 0.31
This commit is contained in:
tracer-ics2023
2024-09-07 23:11:20 +08:00
committed by zzy
parent e0893735fd
commit 6a4d7680f0

View File

@ -10,14 +10,15 @@
#if !defined(__ISA_NATIVE__) || defined(__NATIVE_USE_KLIB__)
int printf(const char *fmt, ...) {
assert(0);
va_list ap;
va_start(ap, fmt);
char buf[1024] = { 0 };
int ret = vsnprintf(buf, sizeof(buf), fmt, ap);
putstr(buf);
va_end(ap);
return ret;
// assert(0);
// va_list ap;
// va_start(ap, fmt);
// char buf[1024] = { 0 };
// int ret = vsnprintf(buf, sizeof(buf), fmt, ap);
// putstr(buf);
// va_end(ap);
// return ret;
panic("Not implemented");
}
int vsprintf(char *out, const char *fmt, va_list ap) {