Index: abi/include/klog.h
===================================================================
--- abi/include/klog.h	(revision a801688bbb63ce8e1f39927867b7500c306a8b52)
+++ abi/include/klog.h	(revision a801688bbb63ce8e1f39927867b7500c306a8b52)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2012 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup generic
+ * @{
+ */
+/** @file
+ */
+
+#ifndef ABI_KLOG_H_
+#define ABI_KLOG_H_
+
+enum {
+	KLOG_UNKNOW,
+	KLOG_WRITE,
+	KLOG_UPDATE,
+	KLOG_COMMAND
+};
+
+#endif
+
+/** @}
+ */
Index: kernel/generic/include/console/console.h
===================================================================
--- kernel/generic/include/console/console.h	(revision 2f33fbc9504dfbfbeb2d4827e8753b7428860b26)
+++ kernel/generic/include/console/console.h	(revision a801688bbb63ce8e1f39927867b7500c306a8b52)
@@ -67,5 +67,5 @@
 extern wchar_t getc(indev_t *indev);
 extern size_t gets(indev_t *indev, char *buf, size_t buflen);
-extern sysarg_t sys_klog(int fd, const void *buf, size_t size);
+extern sysarg_t sys_klog(int cmd, const void *buf, size_t size);
 
 extern void grab_console(void);
Index: kernel/generic/src/console/console.c
===================================================================
--- kernel/generic/src/console/console.c	(revision 2f33fbc9504dfbfbeb2d4827e8753b7428860b26)
+++ kernel/generic/src/console/console.c	(revision a801688bbb63ce8e1f39927867b7500c306a8b52)
@@ -52,4 +52,5 @@
 #include <errno.h>
 #include <str.h>
+#include <abi/klog.h>
 
 #define KLOG_PAGES    8
@@ -335,9 +336,20 @@
  *
  */
-sysarg_t sys_klog(int fd, const void *buf, size_t size)
+sysarg_t sys_klog(int cmd, const void *buf, size_t size)
 {
 	char *data;
 	int rc;
-	
+
+	switch (cmd) {
+	case KLOG_UPDATE:
+		klog_update(NULL);
+		return EOK;
+	case KLOG_WRITE:
+	case KLOG_COMMAND:
+		break;
+	default:
+		return ENOTSUP;
+	}
+
 	if (size > PAGE_SIZE)
 		return (sysarg_t) ELIMIT;
Index: uspace/lib/c/generic/io/klog.c
===================================================================
--- uspace/lib/c/generic/io/klog.c	(revision 2f33fbc9504dfbfbeb2d4827e8753b7428860b26)
+++ uspace/lib/c/generic/io/klog.c	(revision a801688bbb63ce8e1f39927867b7500c306a8b52)
@@ -39,4 +39,5 @@
 #include <unistd.h>
 #include <errno.h>
+#include <abi/klog.h>
 #include <io/klog.h>
 #include <io/printf_core.h>
@@ -44,5 +45,5 @@
 size_t klog_write(const void *buf, size_t size)
 {
-	ssize_t ret = (ssize_t) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, size);
+	ssize_t ret = (ssize_t) __SYSCALL3(SYS_KLOG, KLOG_WRITE, (sysarg_t) buf, size);
 	
 	if (ret >= 0)
@@ -54,5 +55,5 @@
 void klog_update(void)
 {
-	(void) __SYSCALL3(SYS_KLOG, 1, (uintptr_t) NULL, 0);
+	(void) __SYSCALL3(SYS_KLOG, KLOG_UPDATE, (uintptr_t) NULL, 0);
 }
 
Index: uspace/lib/c/include/stdio.h
===================================================================
--- uspace/lib/c/include/stdio.h	(revision 2f33fbc9504dfbfbeb2d4827e8753b7428860b26)
+++ uspace/lib/c/include/stdio.h	(revision a801688bbb63ce8e1f39927867b7500c306a8b52)
@@ -40,4 +40,5 @@
 #include <str.h>
 #include <io/verify.h>
+#include <abi/klog.h>
 
 #define EOF  (-1)
@@ -51,5 +52,5 @@
 		int _n = snprintf(_buf, sizeof(_buf), fmt, ##__VA_ARGS__); \
 		if (_n > 0) \
-			(void) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) _buf, str_size(_buf)); \
+			(void) __SYSCALL3(SYS_KLOG, KLOG_WRITE, (sysarg_t) _buf, str_size(_buf)); \
 	}
 
