debug.c -> debug.cpp
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23511 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f9f49bb963
commit
9d2cde7183
@ -4,7 +4,7 @@ UsePrivateHeaders [ FDirName kernel debug ] syslog_daemon ;
|
||||
|
||||
KernelMergeObject kernel_debug.o :
|
||||
blue_screen.cpp
|
||||
debug.c
|
||||
debug.cpp
|
||||
frame_buffer_console.cpp
|
||||
gdb.c
|
||||
tracing.cpp
|
||||
|
@ -503,14 +503,14 @@ syslog_sender(void *data)
|
||||
acquire_spinlock(&sSpinlock);
|
||||
|
||||
length = ring_buffer_readable(sSyslogBuffer);
|
||||
if (length > SYSLOG_MAX_MESSAGE_LENGTH)
|
||||
if (length > (int32)SYSLOG_MAX_MESSAGE_LENGTH)
|
||||
length = SYSLOG_MAX_MESSAGE_LENGTH;
|
||||
|
||||
length = ring_buffer_read(sSyslogBuffer,
|
||||
(uint8 *)sSyslogMessage->message, length);
|
||||
if (sSyslogDropped) {
|
||||
// add drop marker
|
||||
if (length < SYSLOG_MAX_MESSAGE_LENGTH - 6)
|
||||
if (length < (int32)SYSLOG_MAX_MESSAGE_LENGTH - 6)
|
||||
strlcat(sSyslogMessage->message, "<DROP>", SYSLOG_MAX_MESSAGE_LENGTH);
|
||||
else if (length > 7)
|
||||
strcpy(sSyslogMessage->message + length - 7, "<DROP>");
|
||||
@ -558,7 +558,7 @@ syslog_write(const char *text, int32 length)
|
||||
if (sSyslogBuffer == NULL)
|
||||
return;
|
||||
|
||||
if (ring_buffer_writable(sSyslogBuffer) < length) {
|
||||
if ((int32)ring_buffer_writable(sSyslogBuffer) < length) {
|
||||
// truncate data
|
||||
length = ring_buffer_writable(sSyslogBuffer);
|
||||
|
||||
@ -610,7 +610,7 @@ syslog_init(struct kernel_args *args)
|
||||
if (!sSyslogOutputEnabled)
|
||||
return B_OK;
|
||||
|
||||
sSyslogMessage = malloc(SYSLOG_MESSAGE_BUFFER_SIZE);
|
||||
sSyslogMessage = (syslog_message*)malloc(SYSLOG_MESSAGE_BUFFER_SIZE);
|
||||
if (sSyslogMessage == NULL) {
|
||||
status = B_NO_MEMORY;
|
||||
goto err1;
|
||||
@ -630,7 +630,7 @@ syslog_init(struct kernel_args *args)
|
||||
//strcpy(sSyslogMessage->ident, "KERNEL");
|
||||
|
||||
if (args->debug_output != NULL)
|
||||
syslog_write(args->debug_output, args->debug_size);
|
||||
syslog_write((const char*)args->debug_output, args->debug_size);
|
||||
|
||||
return B_OK;
|
||||
|
@ -5,6 +5,9 @@
|
||||
#ifndef _KERNEL_GDB_H
|
||||
#define _KERNEL_GDB_H
|
||||
|
||||
extern int cmd_gdb(int, char **);
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
int cmd_gdb(int, char **);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user