Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4340 → Rev 4341

/branches/dynload/kernel/generic/src/syscall/syscall.c
62,7 → 62,6
*/
static unative_t sys_klog(int fd, const void * buf, size_t count)
{
size_t i;
char *data;
int rc;
 
70,7 → 69,7
return ELIMIT;
if (count > 0) {
data = (char *) malloc(count, 0);
data = (char *) malloc(count + 1, 0);
if (!data)
return ENOMEM;
79,9 → 78,9
free(data);
return rc;
}
for (i = 0; i < count; i++)
putchar(data[i]);
data[count] = 0;
printf("%s", data);
free(data);
} else
klog_update();
93,7 → 92,7
static unative_t sys_debug_enable_console(void)
{
#ifdef CONFIG_KCONSOLE
arch_grab_console();
grab_console();
return true;
#else
return false;
107,6 → 106,13
return 0;
}
 
/** Tell kernel to relinquish keyboard/console access */
static unative_t sys_debug_disable_console(void)
{
release_console();
return true;
}
 
/** Dispatch system call */
unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
unative_t a4, unative_t a5, unative_t a6, unative_t id)
171,6 → 177,7
(syshandler_t) sys_ipc_answer_fast,
(syshandler_t) sys_ipc_answer_slow,
(syshandler_t) sys_ipc_forward_fast,
(syshandler_t) sys_ipc_forward_slow,
(syshandler_t) sys_ipc_wait_for_call,
(syshandler_t) sys_ipc_hangup,
(syshandler_t) sys_ipc_register_irq,
192,7 → 199,8
/* Debug calls */
(syshandler_t) sys_debug_putint,
(syshandler_t) sys_debug_enable_console,
 
(syshandler_t) sys_debug_disable_console,
(syshandler_t) sys_ipc_connect_kbox
};