Index: uspace/lib/libc/generic/io/io.c
===================================================================
--- uspace/lib/libc/generic/io/io.c	(revision 5b7f418122c84346a6f6d6e912afad481a500266)
+++ uspace/lib/libc/generic/io/io.c	(revision c07544d3bde1c0404c275cec848e7fd36db94ac1)
@@ -39,4 +39,5 @@
 #include <string.h>
 #include <errno.h>
+#include <console.h>
 
 const static char nl = '\n';
@@ -50,6 +51,7 @@
 	
 	for (count = 0; str[count] != 0; count++);
-	if (write_stdout((void *) str, count) == count) {
-		if (write_stdout(&nl, 1) == 1)
+	
+	if (console_write((void *) str, count) == count) {
+		if (console_write(&nl, 1) == 1)
 			return 0;
 	}
@@ -65,5 +67,5 @@
 int putnchars(const char *buf, size_t count)
 {
-	if (write_stdout((void *) buf, count) == count)
+	if (console_write((void *) buf, count) == count)
 		return 0;
 	
@@ -82,5 +84,5 @@
 
 	for (count = 0; str[count] != 0; count++);
-	if (write_stdout((void *) str, count) == count)
+	if (console_write((void *) str, count) == count)
 		return 0;
 	
@@ -97,5 +99,5 @@
 		return EOF;
 
-	if (write_stdout((void *) buf, offs) == offs)
+	if (console_write((void *) buf, offs) == offs)
 		return c;
 
@@ -106,6 +108,6 @@
 {
 	unsigned char c;
-
-	flush_stdout();
+	
+	console_flush();
 	if (read_stdin((void *) &c, 1) == 1)
 		return c;
@@ -116,6 +118,8 @@
 int fflush(FILE *f)
 {
+	/* Dummy implementation */
 	(void) f;
-	return flush_stdout();
+	console_flush();
+	return 0;
 }
 
Index: uspace/lib/libc/generic/io/stream.c
===================================================================
--- uspace/lib/libc/generic/io/stream.c	(revision 5b7f418122c84346a6f6d6e912afad481a500266)
+++ uspace/lib/libc/generic/io/stream.c	(revision c07544d3bde1c0404c275cec848e7fd36db94ac1)
@@ -50,18 +50,13 @@
 #include <sys/types.h>
 
-ssize_t write_stderr(const void *buf, size_t count)
-{
-	return count;
-}
-
 ssize_t read_stdin(void *buf, size_t count)
 {
-	int cons_phone = console_phone_get(false);
-
+	int cons_phone = console_open(false);
+	
 	if (cons_phone >= 0) {
 		kbd_event_t ev;
 		int rc;
 		size_t i = 0;
-	
+		
 		while (i < count) {
 			do {
@@ -69,39 +64,10 @@
 				if (rc < 0) return -1;
 			} while (ev.c == 0 || ev.type == KE_RELEASE);
-
+			
 			((char *) buf)[i++] = ev.c;
 		}
 		return i;
-	} else {
+	} else
 		return -1;
-	}
-}
-
-ssize_t write_stdout(const void *buf, size_t count)
-{
-	int cons_phone = console_phone_get(false);
-	int left, rc;
-
-	if (cons_phone >= 0) {
-		int i;
-
-		left = count;
-		while (left > 0) {
-			rc = console_write(buf, left);
-			if (rc < 0)
-				break;
-			buf += rc;
-			left -= rc;
-		}
-
-		return count;
-	} else
-		return __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, count);
-}
-
-int flush_stdout(void)
-{
-	console_flush();
-	return 0;
 }
 
Index: uspace/lib/libc/generic/io/vprintf.c
===================================================================
--- uspace/lib/libc/generic/io/vprintf.c	(revision 5b7f418122c84346a6f6d6e912afad481a500266)
+++ uspace/lib/libc/generic/io/vprintf.c	(revision c07544d3bde1c0404c275cec848e7fd36db94ac1)
@@ -39,4 +39,5 @@
 #include <futex.h>
 #include <async.h>
+#include <console.h>
 
 static atomic_t printf_futex = FUTEX_INITIALIZER;
@@ -51,5 +52,5 @@
 		prev = offset;
 		str_decode(str, &offset, size);
-		write_stdout(str + prev, offset - prev);
+		console_write(str + prev, offset - prev);
 		chars++;
 	}
@@ -68,5 +69,5 @@
 		boff = 0;
 		chr_encode(str[chars], buf, &boff, 4);
-		write_stdout(buf, boff);
+		console_write(buf, boff);
 		chars++;
 		offset += sizeof(wchar_t);
