mirror of
https://review.haiku-os.org/haiku
synced 2025-02-01 03:06:08 +01:00
/dev/dprintf and _kern_debug_output() weren't dumped to the syslog before, even
if "syslog_debug_output" was set to "true". Reported by Jerome! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16290 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9aaabf116c
commit
3cd6e76965
@ -108,7 +108,7 @@ kputchar(char c)
|
||||
{
|
||||
if (sSerialDebugEnabled)
|
||||
arch_debug_serial_putchar(c);
|
||||
if (sBlueScreenEnabled)
|
||||
if (sBlueScreenEnabled || sDebugScreenEnabled)
|
||||
blue_screen_putchar(c);
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ kputs(const char *s)
|
||||
{
|
||||
if (sSerialDebugEnabled)
|
||||
arch_debug_serial_puts(s);
|
||||
if (sBlueScreenEnabled)
|
||||
if (sBlueScreenEnabled || sDebugScreenEnabled)
|
||||
blue_screen_puts(s);
|
||||
}
|
||||
|
||||
@ -570,11 +570,23 @@ debug_debugger_running(void)
|
||||
void
|
||||
debug_puts(const char *string)
|
||||
{
|
||||
cpu_status state = disable_interrupts();
|
||||
cpu_status state;
|
||||
|
||||
// we only need the length for syslog
|
||||
size_t length = 0;
|
||||
if (sSyslogOutputEnabled)
|
||||
length = strlen(string);
|
||||
|
||||
state = disable_interrupts();
|
||||
acquire_spinlock(&sSpinlock);
|
||||
|
||||
kputs(string);
|
||||
|
||||
// kputs() doesn't output to syslog (as it's only used
|
||||
// from the kernel debugger elsewhere)
|
||||
if (sSyslogOutputEnabled)
|
||||
syslog_write(sOutputBuffer, length);
|
||||
|
||||
release_spinlock(&sSpinlock);
|
||||
restore_interrupts(state);
|
||||
}
|
||||
@ -836,10 +848,7 @@ kprintf(const char *format, ...)
|
||||
vsnprintf(sOutputBuffer, OUTPUT_BUFFER_SIZE, format, args);
|
||||
va_end(args);
|
||||
|
||||
if (sSerialDebugEnabled)
|
||||
arch_debug_serial_puts(sOutputBuffer);
|
||||
if (sBlueScreenEnabled)
|
||||
blue_screen_puts(sOutputBuffer);
|
||||
kputs(sOutputBuffer);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user