Made kputs() available in the kernel and used it for printing debugger
command usage texts, which can be too long for kprintf(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23677 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -56,6 +56,7 @@ extern void debug_puts(const char *s, int32 length);
|
||||
extern bool debug_debugger_running(void);
|
||||
extern void debug_stop_screen_debug_output(void);
|
||||
|
||||
extern void kputs(const char *string);
|
||||
extern void dprintf_no_syslog(const char *format, ...)
|
||||
__attribute__ ((format (__printf__, 1, 2)));
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ kputchar(char c)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
void
|
||||
kputs(const char *s)
|
||||
{
|
||||
if (sSerialDebugEnabled)
|
||||
|
||||
@@ -100,7 +100,7 @@ invoke_debugger_command(struct debugger_command *command, int argc, char** argv)
|
||||
// and print it directly.
|
||||
if (argc == 2 && strcmp(argv[1], "--help") == 0 && command->usage != NULL) {
|
||||
kprintf("usage: %s ", command->name);
|
||||
kprintf(command->usage);
|
||||
kputs(command->usage);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ print_debugger_command_usage(const char* commandName)
|
||||
// command with "--help"
|
||||
if (command->usage != NULL) {
|
||||
kprintf("usage: %s ", command->name);
|
||||
kprintf(command->usage);
|
||||
kputs(command->usage);
|
||||
} else {
|
||||
char* args[3] = { NULL, "--help", NULL };
|
||||
invoke_debugger_command(command, 2, args);
|
||||
|
||||
Reference in New Issue
Block a user