Index: kernel/generic/include/ddi/device.h
===================================================================
--- kernel/generic/include/ddi/device.h	(revision 8015eeeca49b33fa24f838db9d0debfdaa86b938)
+++ kernel/generic/include/ddi/device.h	(revision db90860fdc1d47aaec8d1e18be364a1835f99b85)
@@ -40,4 +40,5 @@
 
 extern devno_t device_assign_devno(void);
+extern unative_t sys_device_assign_devno(void);
 
 #endif
Index: kernel/generic/include/syscall/syscall.h
===================================================================
--- kernel/generic/include/syscall/syscall.h	(revision 8015eeeca49b33fa24f838db9d0debfdaa86b938)
+++ kernel/generic/include/syscall/syscall.h	(revision db90860fdc1d47aaec8d1e18be364a1835f99b85)
@@ -73,4 +73,5 @@
 	SYS_CAP_REVOKE,
 	
+	SYS_DEVICE_ASSIGN_DEVNO,
 	SYS_PHYSMEM_MAP,
 	SYS_IOSPACE_ENABLE,
Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision 8015eeeca49b33fa24f838db9d0debfdaa86b938)
+++ kernel/generic/src/console/kconsole.c	(revision db90860fdc1d47aaec8d1e18be364a1835f99b85)
@@ -135,12 +135,9 @@
 void kconsole_notify_init(void)
 {
-	devno_t devno = device_assign_devno();
-	
 	sysinfo_set_item_val("kconsole.present", NULL, true);
-	sysinfo_set_item_val("kconsole.devno", NULL, devno);
 	sysinfo_set_item_val("kconsole.inr", NULL, KCONSOLE_VIRT_INR);
 	
 	irq_initialize(&kconsole_irq);
-	kconsole_irq.devno = devno;
+	kconsole_irq.devno = device_assign_devno();
 	kconsole_irq.inr = KCONSOLE_VIRT_INR;
 	kconsole_irq.claim = kconsole_claim;
Index: kernel/generic/src/ddi/device.c
===================================================================
--- kernel/generic/src/ddi/device.c	(revision 8015eeeca49b33fa24f838db9d0debfdaa86b938)
+++ kernel/generic/src/ddi/device.c	(revision db90860fdc1d47aaec8d1e18be364a1835f99b85)
@@ -32,5 +32,5 @@
 /**
  * @file
- * @brief	Device numbers.
+ * @brief Device numbers.
  */
 
@@ -48,10 +48,13 @@
 devno_t device_assign_devno(void)
 {
-	devno_t devno;	
+	devno_t devno = (devno_t) atomic_postinc(&last);
+	ASSERT(devno >= 0);
+	
+	return devno;
+}
 
-	devno = (devno_t) atomic_postinc(&last);
-	ASSERT(devno >= 0);
-
-	return devno;
+unative_t sys_device_assign_devno(void)
+{
+	return (unative_t) device_assign_devno();
 }
 
Index: kernel/generic/src/syscall/syscall.c
===================================================================
--- kernel/generic/src/syscall/syscall.c	(revision 8015eeeca49b33fa24f838db9d0debfdaa86b938)
+++ kernel/generic/src/syscall/syscall.c	(revision db90860fdc1d47aaec8d1e18be364a1835f99b85)
@@ -33,7 +33,7 @@
 /**
  * @file
- * @brief	Syscall table and syscall wrappers.
+ * @brief Syscall table and syscall wrappers.
  */
- 
+
 #include <syscall/syscall.h>
 #include <proc/thread.h>
@@ -43,7 +43,7 @@
 #include <print.h>
 #include <putchar.h>
-#include <errno.h>
 #include <arch.h>
 #include <debug.h>
+#include <ddi/device.h>
 #include <ipc/sysipc.h>
 #include <synch/futex.h>
@@ -51,59 +51,7 @@
 #include <ddi/ddi.h>
 #include <security/cap.h>
-#include <syscall/copy.h>
 #include <sysinfo/sysinfo.h>
 #include <console/console.h>
 #include <udebug/udebug.h>
-
-/** Print using kernel facility
- *
- * Print to kernel log.
- *
- */
-static unative_t sys_klog(int fd, const void * buf, size_t count) 
-{
-	char *data;
-	int rc;
-
-	if (count > PAGE_SIZE)
-		return ELIMIT;
-	
-	if (count > 0) {
-		data = (char *) malloc(count + 1, 0);
-		if (!data)
-			return ENOMEM;
-		
-		rc = copy_from_uspace(data, buf, count);
-		if (rc) {
-			free(data);
-			return rc;
-		}
-		data[count] = 0;
-		
-		printf("%s", data);
-		free(data);
-	} else
-		klog_update();
-	
-	return count;
-}
-
-/** Tell kernel to get keyboard/console access again */
-static unative_t sys_debug_enable_console(void)
-{
-#ifdef CONFIG_KCONSOLE
-	grab_console();
-	return true;
-#else
-	return false;
-#endif
-}
-
-/** Tell kernel to relinquish keyboard/console access */
-static unative_t sys_debug_disable_console(void)
-{
-	release_console();
-	return true;
-}
 
 /** Dispatch system call */
@@ -112,9 +60,10 @@
 {
 	unative_t rc;
-
+	
 #ifdef CONFIG_UDEBUG
 	udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false);
 #endif
-	if (id < SYSCALL_END) {	
+	
+	if (id < SYSCALL_END) {
 		rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
 	} else {
@@ -123,11 +72,11 @@
 		thread_exit();
 	}
-		
+	
 	if (THREAD->interrupted)
 		thread_exit();
-
+	
 #ifdef CONFIG_UDEBUG
 	udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true);
-
+	
 	/*
 	 * Stopping point needed for tasks that only invoke non-blocking
@@ -136,5 +85,6 @@
 	udebug_stoppable_begin();
 	udebug_stoppable_end();
-#endif	
+#endif
+	
 	return rc;
 }
@@ -183,4 +133,5 @@
 	
 	/* DDI related syscalls. */
+	(syshandler_t) sys_device_assign_devno,
 	(syshandler_t) sys_physmem_map,
 	(syshandler_t) sys_iospace_enable,
