* That must have been a BeOS limitation, at least our kernel sports the same

generic API for each architecture.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29919 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-04-05 08:01:23 +00:00
parent 14cfdab543
commit 9200ccec5a
2 changed files with 3 additions and 38 deletions

View File

@ -338,17 +338,12 @@ panic(const char *format, ...)
char buffer[1024];
strcpy(buffer, "PANIC: ");
int32 prefixLen = strlen(buffer);
va_list args;
va_start(args, format);
// no vsnprintf() on PPC
#if defined(__INTEL__)
int bufferSize = sizeof(buffer) - prefixLen;
vsnprintf(buffer + prefixLen, bufferSize - 1, format, args);
#else
vsprintf(buffer + prefixLen, format, args);
#endif
vsnprintf(buffer + prefixLen, sizeof(buffer) - prefixLen, format, args);
va_end(args);
buffer[sizeof(buffer) - 1] = '\0';
debugger(buffer);
}

View File

@ -900,36 +900,6 @@ UserlandFS::KernelEmu::kernel_debugger(const char *message)
debugger(message);
}
// vpanic
void
UserlandFS::KernelEmu::vpanic(const char *format, va_list args)
{
char buffer[1024];
strcpy(buffer, "PANIC: ");
int32 prefixLen = strlen(buffer);
// no vsnprintf() on PPC
#if defined(__INTEL__)
int bufferSize = sizeof(buffer) - prefixLen;
vsnprintf(buffer + prefixLen, bufferSize - 1, format, args);
#else
vsprintf(buffer + prefixLen, format, args);
#endif
buffer[sizeof(buffer) - 1] = '\0';
debugger(buffer);
}
// panic
void
UserlandFS::KernelEmu::panic(const char *format, ...)
{
va_list args;
va_start(args, format);
vpanic(format, args);
va_end(args);
}
// vdprintf
void
UserlandFS::KernelEmu::vdprintf(const char *format, va_list args)