Index: uspace/Makefile
===================================================================
--- uspace/Makefile	(revision 208b5f542c8db6c9ce6844cd62a6794e94185293)
+++ uspace/Makefile	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
@@ -50,5 +50,5 @@
 	app/kill \
 	app/killall \
-	app/klog \
+	app/kio \
 	app/loc \
 	app/logset \
Index: uspace/app/kio/Makefile
===================================================================
--- uspace/app/kio/Makefile	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
+++ uspace/app/kio/Makefile	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 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.
+#
+
+USPACE_PREFIX = ../..
+LIBS = $(LIBCLUI_PREFIX)/libclui.a
+EXTRA_CFLAGS = -I$(LIBCLUI_PREFIX)
+BINARY = kio
+
+SOURCES = \
+	kio.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/kio/kio.c
===================================================================
--- uspace/app/kio/kio.c	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
+++ uspace/app/kio/kio.c	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
@@ -0,0 +1,261 @@
+/*
+ * Copyright (c) 2006 Ondrej Palkovsky
+ * 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 kio KIO
+ * @brief HelenOS KIO
+ * @{
+ */
+/**
+ * @file
+ */
+
+#include <stdio.h>
+#include <async.h>
+#include <as.h>
+#include <ddi.h>
+#include <event.h>
+#include <errno.h>
+#include <str_error.h>
+#include <io/kio.h>
+#include <sysinfo.h>
+#include <malloc.h>
+#include <fibril_synch.h>
+#include <adt/list.h>
+#include <adt/prodcons.h>
+#include <tinput.h>
+
+#define NAME       "kio"
+#define LOG_FNAME  "/log/kio"
+
+/* Producer/consumer buffers */
+typedef struct {
+	link_t link;
+	size_t length;
+	wchar_t *data;
+} item_t;
+
+static prodcons_t pc;
+
+/* Pointer to kio area */
+static wchar_t *kio;
+static size_t kio_length;
+
+/* Notification mutex */
+static FIBRIL_MUTEX_INITIALIZE(mtx);
+
+/** Klog producer
+ *
+ * Copies the contents of a character buffer to local
+ * producer/consumer queue.
+ *
+ * @param length Number of characters to copy.
+ * @param data   Pointer to the kernel kio buffer.
+ *
+ */
+static void producer(size_t length, wchar_t *data)
+{
+	item_t *item = (item_t *) malloc(sizeof(item_t));
+	if (item == NULL)
+		return;
+	
+	size_t sz = sizeof(wchar_t) * length;
+	wchar_t *buf = (wchar_t *) malloc(sz);
+	if (data == NULL) {
+		free(item);
+		return;
+	}
+	
+	memcpy(buf, data, sz);
+	
+	link_initialize(&item->link);
+	item->length = length;
+	item->data = buf;
+	prodcons_produce(&pc, &item->link);
+}
+
+/** Klog consumer
+ *
+ * Waits in an infinite loop for the character data created by
+ * the producer and outputs them to stdout and optionally into
+ * a file.
+ *
+ * @param data Unused.
+ *
+ * @return Always EOK (unreachable).
+ *
+ */
+static int consumer(void *data)
+{
+	FILE *log = fopen(LOG_FNAME, "a");
+	if (log == NULL)
+		printf("%s: Unable to create log file %s (%s)\n", NAME, LOG_FNAME,
+		    str_error(errno));
+	
+	while (true) {
+		link_t *link = prodcons_consume(&pc);
+		item_t *item = list_get_instance(link, item_t, link);
+		
+		for (size_t i = 0; i < item->length; i++)
+			putchar(item->data[i]);
+		
+		if (log != NULL) {
+			for (size_t i = 0; i < item->length; i++)
+				fputc(item->data[i], log);
+			
+			fflush(log);
+			fsync(fileno(log));
+		}
+		
+		free(item->data);
+		free(item);
+	}
+	
+	fclose(log);
+	return EOK;
+}
+
+/** Kernel notification handler
+ *
+ * Receives kernel kio notifications.
+ *
+ * @param callid IPC call ID
+ * @param call   IPC call structure
+ * @param arg    Local argument
+ *
+ */
+static void notification_received(ipc_callid_t callid, ipc_call_t *call)
+{
+	/*
+	 * Make sure we process only a single notification
+	 * at any time to limit the chance of the consumer
+	 * starving.
+	 *
+	 * Note: Usually the automatic masking of the kio
+	 * notifications on the kernel side does the trick
+	 * of limiting the chance of accidentally copying
+	 * the same data multiple times. However, due to
+	 * the non-blocking architecture of kio notifications,
+	 * this possibility cannot be generally avoided.
+	 */
+	
+	fibril_mutex_lock(&mtx);
+	
+	size_t kio_start = (size_t) IPC_GET_ARG1(*call);
+	size_t kio_len = (size_t) IPC_GET_ARG2(*call);
+	size_t kio_stored = (size_t) IPC_GET_ARG3(*call);
+	
+	size_t offset = (kio_start + kio_len - kio_stored) % kio_length;
+	
+	/* Copy data from the ring buffer */
+	if (offset + kio_stored >= kio_length) {
+		size_t split = kio_length - offset;
+		
+		producer(split, kio + offset);
+		producer(kio_stored - split, kio);
+	} else
+		producer(kio_stored, kio + offset);
+	
+	event_unmask(EVENT_KIO);
+	fibril_mutex_unlock(&mtx);
+}
+
+int main(int argc, char *argv[])
+{
+	size_t pages;
+	int rc = sysinfo_get_value("kio.pages", &pages);
+	if (rc != EOK) {
+		fprintf(stderr, "%s: Unable to get number of kio pages\n",
+		    NAME);
+		return rc;
+	}
+	
+	uintptr_t faddr;
+	rc = sysinfo_get_value("kio.faddr", &faddr);
+	if (rc != EOK) {
+		fprintf(stderr, "%s: Unable to get kio physical address\n",
+		    NAME);
+		return rc;
+	}
+	
+	size_t size = pages * PAGE_SIZE;
+	kio_length = size / sizeof(wchar_t);
+	
+	rc = physmem_map(faddr, pages, AS_AREA_READ | AS_AREA_CACHEABLE,
+	    (void *) &kio);
+	if (rc != EOK) {
+		fprintf(stderr, "%s: Unable to map kio\n", NAME);
+		return rc;
+	}
+	
+	prodcons_initialize(&pc);
+	async_set_interrupt_received(notification_received);
+	rc = event_subscribe(EVENT_KIO, 0);
+	if (rc != EOK) {
+		fprintf(stderr, "%s: Unable to register kio notifications\n",
+		    NAME);
+		return rc;
+	}
+	
+	fid_t fid = fibril_create(consumer, NULL);
+	if (!fid) {
+		fprintf(stderr, "%s: Unable to create consumer fibril\n",
+		    NAME);
+		return ENOMEM;
+	}
+	
+	tinput_t *input = tinput_new();
+	if (!input) {
+		fprintf(stderr, "%s: Could not create input\n", NAME);
+		return ENOMEM;
+	}	
+
+	fibril_add_ready(fid);
+	event_unmask(EVENT_KIO);
+	kio_update();
+	
+	tinput_set_prompt(input, "kio> ");
+
+	char *str;
+	while ((rc = tinput_read(input, &str)) == EOK) {
+		if (str_cmp(str, "") == 0) {
+			free(str);
+			continue;
+		}
+
+		kio_command(str, str_size(str));
+		free(str);
+	}
+ 
+	if (rc == ENOENT)
+		rc = EOK;	
+
+	return EOK;
+}
+
+/** @}
+ */
Index: uspace/app/klog/Makefile
===================================================================
--- uspace/app/klog/Makefile	(revision 208b5f542c8db6c9ce6844cd62a6794e94185293)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 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.
-#
-
-USPACE_PREFIX = ../..
-LIBS = $(LIBCLUI_PREFIX)/libclui.a
-EXTRA_CFLAGS = -I$(LIBCLUI_PREFIX)
-BINARY = klog
-
-SOURCES = \
-	klog.c
-
-include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/klog/klog.c
===================================================================
--- uspace/app/klog/klog.c	(revision 208b5f542c8db6c9ce6844cd62a6794e94185293)
+++ 	(revision )
@@ -1,261 +1,0 @@
-/*
- * Copyright (c) 2006 Ondrej Palkovsky
- * 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 klog KLog
- * @brief HelenOS KLog
- * @{
- */
-/**
- * @file
- */
-
-#include <stdio.h>
-#include <async.h>
-#include <as.h>
-#include <ddi.h>
-#include <event.h>
-#include <errno.h>
-#include <str_error.h>
-#include <io/klog.h>
-#include <sysinfo.h>
-#include <malloc.h>
-#include <fibril_synch.h>
-#include <adt/list.h>
-#include <adt/prodcons.h>
-#include <tinput.h>
-
-#define NAME       "klog"
-#define LOG_FNAME  "/log/klog"
-
-/* Producer/consumer buffers */
-typedef struct {
-	link_t link;
-	size_t length;
-	wchar_t *data;
-} item_t;
-
-static prodcons_t pc;
-
-/* Pointer to klog area */
-static wchar_t *klog;
-static size_t klog_length;
-
-/* Notification mutex */
-static FIBRIL_MUTEX_INITIALIZE(mtx);
-
-/** Klog producer
- *
- * Copies the contents of a character buffer to local
- * producer/consumer queue.
- *
- * @param length Number of characters to copy.
- * @param data   Pointer to the kernel klog buffer.
- *
- */
-static void producer(size_t length, wchar_t *data)
-{
-	item_t *item = (item_t *) malloc(sizeof(item_t));
-	if (item == NULL)
-		return;
-	
-	size_t sz = sizeof(wchar_t) * length;
-	wchar_t *buf = (wchar_t *) malloc(sz);
-	if (data == NULL) {
-		free(item);
-		return;
-	}
-	
-	memcpy(buf, data, sz);
-	
-	link_initialize(&item->link);
-	item->length = length;
-	item->data = buf;
-	prodcons_produce(&pc, &item->link);
-}
-
-/** Klog consumer
- *
- * Waits in an infinite loop for the character data created by
- * the producer and outputs them to stdout and optionally into
- * a file.
- *
- * @param data Unused.
- *
- * @return Always EOK (unreachable).
- *
- */
-static int consumer(void *data)
-{
-	FILE *log = fopen(LOG_FNAME, "a");
-	if (log == NULL)
-		printf("%s: Unable to create log file %s (%s)\n", NAME, LOG_FNAME,
-		    str_error(errno));
-	
-	while (true) {
-		link_t *link = prodcons_consume(&pc);
-		item_t *item = list_get_instance(link, item_t, link);
-		
-		for (size_t i = 0; i < item->length; i++)
-			putchar(item->data[i]);
-		
-		if (log != NULL) {
-			for (size_t i = 0; i < item->length; i++)
-				fputc(item->data[i], log);
-			
-			fflush(log);
-			fsync(fileno(log));
-		}
-		
-		free(item->data);
-		free(item);
-	}
-	
-	fclose(log);
-	return EOK;
-}
-
-/** Kernel notification handler
- *
- * Receives kernel klog notifications.
- *
- * @param callid IPC call ID
- * @param call   IPC call structure
- * @param arg    Local argument
- *
- */
-static void notification_received(ipc_callid_t callid, ipc_call_t *call)
-{
-	/*
-	 * Make sure we process only a single notification
-	 * at any time to limit the chance of the consumer
-	 * starving.
-	 *
-	 * Note: Usually the automatic masking of the klog
-	 * notifications on the kernel side does the trick
-	 * of limiting the chance of accidentally copying
-	 * the same data multiple times. However, due to
-	 * the non-blocking architecture of klog notifications,
-	 * this possibility cannot be generally avoided.
-	 */
-	
-	fibril_mutex_lock(&mtx);
-	
-	size_t klog_start = (size_t) IPC_GET_ARG1(*call);
-	size_t klog_len = (size_t) IPC_GET_ARG2(*call);
-	size_t klog_stored = (size_t) IPC_GET_ARG3(*call);
-	
-	size_t offset = (klog_start + klog_len - klog_stored) % klog_length;
-	
-	/* Copy data from the ring buffer */
-	if (offset + klog_stored >= klog_length) {
-		size_t split = klog_length - offset;
-		
-		producer(split, klog + offset);
-		producer(klog_stored - split, klog);
-	} else
-		producer(klog_stored, klog + offset);
-	
-	event_unmask(EVENT_KLOG);
-	fibril_mutex_unlock(&mtx);
-}
-
-int main(int argc, char *argv[])
-{
-	size_t pages;
-	int rc = sysinfo_get_value("klog.pages", &pages);
-	if (rc != EOK) {
-		fprintf(stderr, "%s: Unable to get number of klog pages\n",
-		    NAME);
-		return rc;
-	}
-	
-	uintptr_t faddr;
-	rc = sysinfo_get_value("klog.faddr", &faddr);
-	if (rc != EOK) {
-		fprintf(stderr, "%s: Unable to get klog physical address\n",
-		    NAME);
-		return rc;
-	}
-	
-	size_t size = pages * PAGE_SIZE;
-	klog_length = size / sizeof(wchar_t);
-	
-	rc = physmem_map(faddr, pages, AS_AREA_READ | AS_AREA_CACHEABLE,
-	    (void *) &klog);
-	if (rc != EOK) {
-		fprintf(stderr, "%s: Unable to map klog\n", NAME);
-		return rc;
-	}
-	
-	prodcons_initialize(&pc);
-	async_set_interrupt_received(notification_received);
-	rc = event_subscribe(EVENT_KLOG, 0);
-	if (rc != EOK) {
-		fprintf(stderr, "%s: Unable to register klog notifications\n",
-		    NAME);
-		return rc;
-	}
-	
-	fid_t fid = fibril_create(consumer, NULL);
-	if (!fid) {
-		fprintf(stderr, "%s: Unable to create consumer fibril\n",
-		    NAME);
-		return ENOMEM;
-	}
-	
-	tinput_t *input = tinput_new();
-	if (!input) {
-		fprintf(stderr, "%s: Could not create input\n", NAME);
-		return ENOMEM;
-	}	
-
-	fibril_add_ready(fid);
-	event_unmask(EVENT_KLOG);
-	klog_update();
-	
-	tinput_set_prompt(input, "klog> ");
-
-	char *str;
-	while ((rc = tinput_read(input, &str)) == EOK) {
-		if (str_cmp(str, "") == 0) {
-			free(str);
-			continue;
-		}
-
-		klog_command(str, str_size(str));
-		free(str);
-	}
- 
-	if (rc == ENOENT)
-		rc = EOK;	
-
-	return EOK;
-}
-
-/** @}
- */
Index: uspace/app/trace/syscalls.c
===================================================================
--- uspace/app/trace/syscalls.c	(revision 208b5f542c8db6c9ce6844cd62a6794e94185293)
+++ uspace/app/trace/syscalls.c	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
@@ -38,5 +38,5 @@
 
 const sc_desc_t syscall_desc[] = {
-    [SYS_KLOG] ={ "klog",				3,	V_INT_ERRNO },
+    [SYS_KIO] ={ "kio",					3,	V_INT_ERRNO },
     [SYS_TLS_SET] = { "tls_set",			1,	V_ERRNO },
 
Index: uspace/lib/c/Makefile
===================================================================
--- uspace/lib/c/Makefile	(revision 208b5f542c8db6c9ce6844cd62a6794e94185293)
+++ uspace/lib/c/Makefile	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
@@ -107,5 +107,5 @@
 	generic/io/log.c \
 	generic/io/logctl.c \
-	generic/io/klog.c \
+	generic/io/kio.c \
 	generic/io/snprintf.c \
 	generic/io/vprintf.c \
Index: uspace/lib/c/generic/assert.c
===================================================================
--- uspace/lib/c/generic/assert.c	(revision 208b5f542c8db6c9ce6844cd62a6794e94185293)
+++ uspace/lib/c/generic/assert.c	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
@@ -33,5 +33,5 @@
 #include <assert.h>
 #include <stdio.h>
-#include <io/klog.h>
+#include <io/kio.h>
 #include <stdlib.h>
 #include <atomic.h>
@@ -44,7 +44,7 @@
 {
 	/*
-	 * Send the message safely to klog. Nested asserts should not occur.
+	 * Send the message safely to kio. Nested asserts should not occur.
 	 */
-	klog_printf("Assertion failed (%s) in file \"%s\", line %u.\n",
+	kio_printf("Assertion failed (%s) in file \"%s\", line %u.\n",
 	    cond, file, line);
 	
Index: uspace/lib/c/generic/io/io.c
===================================================================
--- uspace/lib/c/generic/io/io.c	(revision 208b5f542c8db6c9ce6844cd62a6794e94185293)
+++ uspace/lib/c/generic/io/io.c	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
@@ -42,5 +42,5 @@
 #include <malloc.h>
 #include <async.h>
-#include <io/klog.h>
+#include <io/kio.h>
 #include <vfs/vfs.h>
 #include <vfs/vfs_sess.h>
@@ -57,5 +57,5 @@
 	.error = true,
 	.eof = true,
-	.klog = false,
+	.kio = false,
 	.sess = NULL,
 	.btype = _IONBF,
@@ -67,9 +67,9 @@
 };
 
-static FILE stdout_klog = {
+static FILE stdout_kio = {
 	.fd = -1,
 	.error = false,
 	.eof = false,
-	.klog = true,
+	.kio = true,
 	.sess = NULL,
 	.btype = _IOLBF,
@@ -81,9 +81,9 @@
 };
 
-static FILE stderr_klog = {
+static FILE stderr_kio = {
 	.fd = -1,
 	.error = false,
 	.eof = false,
-	.klog = true,
+	.kio = true,
 	.sess = NULL,
 	.btype = _IONBF,
@@ -113,5 +113,5 @@
 		stdout = fdopen(1, "w");
 	} else {
-		stdout = &stdout_klog;
+		stdout = &stdout_kio;
 		list_append(&stdout->link, &files);
 	}
@@ -120,5 +120,5 @@
 		stderr = fdopen(2, "w");
 	} else {
-		stderr = &stderr_klog;
+		stderr = &stderr_kio;
 		list_append(&stderr->link, &files);
 	}
@@ -267,5 +267,5 @@
 	stream->error = false;
 	stream->eof = false;
-	stream->klog = false;
+	stream->kio = false;
 	stream->sess = NULL;
 	stream->need_sync = false;
@@ -289,5 +289,5 @@
 	stream->error = false;
 	stream->eof = false;
-	stream->klog = false;
+	stream->kio = false;
 	stream->sess = NULL;
 	stream->need_sync = false;
@@ -314,6 +314,6 @@
 	
 	if ((stream != &stdin_null)
-	    && (stream != &stdout_klog)
-	    && (stream != &stderr_klog))
+	    && (stream != &stdout_kio)
+	    && (stream != &stderr_kio))
 		free(stream);
 	
@@ -382,6 +382,6 @@
 		ssize_t wr;
 		
-		if (stream->klog)
-			wr = klog_write(buf + done, left);
+		if (stream->kio)
+			wr = kio_write(buf + done, left);
 		else
 			wr = write(stream->fd, buf + done, left);
@@ -705,6 +705,6 @@
 	_fflushbuf(stream);
 	
-	if (stream->klog) {
-		klog_update();
+	if (stream->kio) {
+		kio_update();
 		return EOK;
 	}
@@ -740,5 +740,5 @@
 int fileno(FILE *stream)
 {
-	if (stream->klog) {
+	if (stream->kio) {
 		errno = EBADF;
 		return -1;
Index: uspace/lib/c/generic/io/kio.c
===================================================================
--- uspace/lib/c/generic/io/kio.c	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
+++ uspace/lib/c/generic/io/kio.c	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2006 Josef Cejka
+ * Copyright (c) 2006 Jakub Vana
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <libc.h>
+#include <str.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <errno.h>
+#include <abi/kio.h>
+#include <io/kio.h>
+#include <io/printf_core.h>
+
+size_t kio_write(const void *buf, size_t size)
+{
+	ssize_t ret = (ssize_t) __SYSCALL3(SYS_KIO, KIO_WRITE, (sysarg_t) buf, size);
+	
+	if (ret >= 0)
+		return (size_t) ret;
+	
+	return 0;
+}
+
+void kio_update(void)
+{
+	(void) __SYSCALL3(SYS_KIO, KIO_UPDATE, (uintptr_t) NULL, 0);
+}
+
+void kio_command(const void *buf, size_t size)
+{
+	(void) __SYSCALL3(SYS_KIO, KIO_COMMAND, (sysarg_t) buf, (sysarg_t) size);
+}
+
+/** Print formatted text to kio.
+ *
+ * @param fmt Format string
+ *
+ * \see For more details about format string see printf_core.
+ *
+ */
+int kio_printf(const char *fmt, ...)
+{
+	va_list args;
+	va_start(args, fmt);
+	
+	int ret = kio_vprintf(fmt, args);
+	
+	va_end(args);
+	
+	return ret;
+}
+
+static int kio_vprintf_str_write(const char *str, size_t size, void *data)
+{
+	size_t wr = kio_write(str, size);
+	return str_nlength(str, wr);
+}
+
+static int kio_vprintf_wstr_write(const wchar_t *str, size_t size, void *data)
+{
+	size_t offset = 0;
+	size_t chars = 0;
+	
+	while (offset < size) {
+		char buf[STR_BOUNDS(1)];
+		size_t sz = 0;
+		
+		if (chr_encode(str[chars], buf, &sz, STR_BOUNDS(1)) == EOK)
+			kio_write(buf, sz);
+		
+		chars++;
+		offset += sizeof(wchar_t);
+	}
+	
+	return chars;
+}
+
+/** Print formatted text to kio.
+ *
+ * @param fmt Format string
+ * @param ap  Format parameters
+ *
+ * \see For more details about format string see printf_core.
+ *
+ */
+int kio_vprintf(const char *fmt, va_list ap)
+{
+	printf_spec_t ps = {
+		kio_vprintf_str_write,
+		kio_vprintf_wstr_write,
+		NULL
+	};
+	
+	return printf_core(fmt, &ps, ap);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/io/klog.c
===================================================================
--- uspace/lib/c/generic/io/klog.c	(revision 208b5f542c8db6c9ce6844cd62a6794e94185293)
+++ 	(revision )
@@ -1,129 +1,0 @@
-/*
- * Copyright (c) 2006 Josef Cejka
- * Copyright (c) 2006 Jakub Vana
- * 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 libc
- * @{
- */
-/** @file
- */
-
-#include <libc.h>
-#include <str.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <errno.h>
-#include <abi/klog.h>
-#include <io/klog.h>
-#include <io/printf_core.h>
-
-size_t klog_write(const void *buf, size_t size)
-{
-	ssize_t ret = (ssize_t) __SYSCALL3(SYS_KLOG, KLOG_WRITE, (sysarg_t) buf, size);
-	
-	if (ret >= 0)
-		return (size_t) ret;
-	
-	return 0;
-}
-
-void klog_update(void)
-{
-	(void) __SYSCALL3(SYS_KLOG, KLOG_UPDATE, (uintptr_t) NULL, 0);
-}
-
-void klog_command(const void *buf, size_t size)
-{
-	(void) __SYSCALL3(SYS_KLOG, KLOG_COMMAND, (sysarg_t) buf, (sysarg_t) size);
-}
-
-/** Print formatted text to klog.
- *
- * @param fmt Format string
- *
- * \see For more details about format string see printf_core.
- *
- */
-int klog_printf(const char *fmt, ...)
-{
-	va_list args;
-	va_start(args, fmt);
-	
-	int ret = klog_vprintf(fmt, args);
-	
-	va_end(args);
-	
-	return ret;
-}
-
-static int klog_vprintf_str_write(const char *str, size_t size, void *data)
-{
-	size_t wr = klog_write(str, size);
-	return str_nlength(str, wr);
-}
-
-static int klog_vprintf_wstr_write(const wchar_t *str, size_t size, void *data)
-{
-	size_t offset = 0;
-	size_t chars = 0;
-	
-	while (offset < size) {
-		char buf[STR_BOUNDS(1)];
-		size_t sz = 0;
-		
-		if (chr_encode(str[chars], buf, &sz, STR_BOUNDS(1)) == EOK)
-			klog_write(buf, sz);
-		
-		chars++;
-		offset += sizeof(wchar_t);
-	}
-	
-	return chars;
-}
-
-/** Print formatted text to klog.
- *
- * @param fmt Format string
- * @param ap  Format parameters
- *
- * \see For more details about format string see printf_core.
- *
- */
-int klog_vprintf(const char *fmt, va_list ap)
-{
-	printf_spec_t ps = {
-		klog_vprintf_str_write,
-		klog_vprintf_wstr_write,
-		NULL
-	};
-	
-	return printf_core(fmt, &ps, ap);
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/private/stdio.h
===================================================================
--- uspace/lib/c/generic/private/stdio.h	(revision 208b5f542c8db6c9ce6844cd62a6794e94185293)
+++ uspace/lib/c/generic/private/stdio.h	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
@@ -53,6 +53,6 @@
 	int eof;
 	
-	/** Klog indicator */
-	int klog;
+	/** KIO indicator */
+	int kio;
 	
 	/** Session to the file provider */
Index: uspace/lib/c/include/io/kio.h
===================================================================
--- uspace/lib/c/include/io/kio.h	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
+++ uspace/lib/c/include/io/kio.h	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2006 Jakub Vana
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_IO_KIO_H_
+#define LIBC_IO_KIO_H_
+
+#include <sys/types.h>
+#include <stdarg.h>
+#include <io/verify.h>
+
+extern size_t kio_write(const void *, size_t);
+extern void kio_update(void);
+extern void kio_command(const void *, size_t);
+extern int kio_printf(const char *, ...)
+    PRINTF_ATTRIBUTE(1, 2);
+extern int kio_vprintf(const char *, va_list);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/io/klog.h
===================================================================
--- uspace/lib/c/include/io/klog.h	(revision 208b5f542c8db6c9ce6844cd62a6794e94185293)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
- * Copyright (c) 2006 Jakub Vana
- * 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_IO_KLOG_H_
-#define LIBC_IO_KLOG_H_
-
-#include <sys/types.h>
-#include <stdarg.h>
-#include <io/verify.h>
-
-extern size_t klog_write(const void *, size_t);
-extern void klog_update(void);
-extern void klog_command(const void *, size_t);
-extern int klog_printf(const char *, ...)
-    PRINTF_ATTRIBUTE(1, 2);
-extern int klog_vprintf(const char *, va_list);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/stdio.h
===================================================================
--- uspace/lib/c/include/stdio.h	(revision 208b5f542c8db6c9ce6844cd62a6794e94185293)
+++ uspace/lib/c/include/stdio.h	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
@@ -40,5 +40,5 @@
 #include <str.h>
 #include <io/verify.h>
-#include <abi/klog.h>
+#include <abi/kio.h>
 
 #define EOF  (-1)
@@ -52,5 +52,5 @@
 		int _n = snprintf(_buf, sizeof(_buf), fmt, ##__VA_ARGS__); \
 		if (_n > 0) \
-			(void) __SYSCALL3(SYS_KLOG, KLOG_WRITE, (sysarg_t) _buf, str_size(_buf)); \
+			(void) __SYSCALL3(SYS_KIO, KIO_WRITE, (sysarg_t) _buf, str_size(_buf)); \
 	}
 
