Index: kernel/generic/src/console/chardev.c
===================================================================
--- kernel/generic/src/console/chardev.c	(revision 87d71bfd433990e95005f44f420e7d1538b52478)
+++ kernel/generic/src/console/chardev.c	(revision 566f4cfb502715c66762e1fa7a0827f52ac83ec3)
@@ -36,4 +36,7 @@
 #include <synch/waitq.h>
 #include <synch/spinlock.h>
+#include <print.h>
+#include <func.h>
+#include <arch.h>
 
 /** Initialize input character device.
@@ -80,4 +83,44 @@
 }
 
+/** Pop character from input character device.
+ *
+ * @param indev Input character device.
+ *
+ * @return Character read.
+ *
+ */
+wchar_t indev_pop_character(indev_t *indev)
+{
+	if (atomic_get(&haltstate)) {
+		/* If we are here, we are hopefully on the processor that
+		 * issued the 'halt' command, so proceed to read the character
+		 * directly from input
+		 */
+		if (check_poll(indev))
+			return indev->op->poll(indev);
+		
+		/* No other way of interacting with user */
+		interrupts_disable();
+		
+		if (CPU)
+			printf("cpu%u: ", CPU->id);
+		else
+			printf("cpu: ");
+		
+		printf("halted (no polling input)\n");
+		cpu_halt();
+	}
+	
+	waitq_sleep(&indev->wq);
+	ipl_t ipl = interrupts_disable();
+	spinlock_lock(&indev->lock);
+	wchar_t ch = indev->buffer[(indev->index - indev->counter) % INDEV_BUFLEN];
+	indev->counter--;
+	spinlock_unlock(&indev->lock);
+	interrupts_restore(ipl);
+	
+	return ch;
+}
+
 /** Initialize output character device.
  *
@@ -94,4 +137,15 @@
 }
 
+bool check_poll(indev_t *indev)
+{
+	if (indev == NULL)
+		return false;
+	
+	if (indev->op == NULL)
+		return false;
+	
+	return (indev->op->poll != NULL);
+}
+
 /** @}
  */
Index: kernel/generic/src/console/console.c
===================================================================
--- kernel/generic/src/console/console.c	(revision 87d71bfd433990e95005f44f420e7d1538b52478)
+++ kernel/generic/src/console/console.c	(revision 566f4cfb502715c66762e1fa7a0827f52ac83ec3)
@@ -45,5 +45,4 @@
 #include <ipc/irq.h>
 #include <arch.h>
-#include <func.h>
 #include <print.h>
 #include <putchar.h>
@@ -71,16 +70,31 @@
 static size_t klog_uspace = 0;
 
+/** Kernel log spinlock */
+SPINLOCK_INITIALIZE(klog_lock);
+
+/** Physical memory area used for klog buffer */
+static parea_t klog_parea;
+
+static indev_operations_t stdin_ops = {
+	.poll = NULL
+};
+
 /** Silence output */
 bool silent = false;
-
-/** Kernel log spinlock */
-SPINLOCK_INITIALIZE(klog_lock);
-
-/** Physical memory area used for klog buffer */
-static parea_t klog_parea;
 
 /** Standard input and output character devices */
 indev_t *stdin = NULL;
 outdev_t *stdout = NULL;
+
+indev_t *stdin_wire(void)
+{
+	if (stdin == NULL) {
+		stdin = malloc(sizeof(indev_t), FRAME_ATOMIC);
+		if (stdin != NULL)
+			indev_initialize("stdin", stdin, &stdin_ops);
+	}
+	
+	return stdin;
+}
 
 /** Initialize kernel logging facility
@@ -139,53 +153,4 @@
 }
 
-bool check_poll(indev_t *indev)
-{
-	if (indev == NULL)
-		return false;
-	
-	if (indev->op == NULL)
-		return false;
-	
-	return (indev->op->poll != NULL);
-}
-
-/** Get character from input character device. Do not echo character.
- *
- * @param indev Input character device.
- * @return Character read.
- *
- */
-wchar_t _getc(indev_t *indev)
-{
-	if (atomic_get(&haltstate)) {
-		/* If we are here, we are hopefully on the processor that
-		 * issued the 'halt' command, so proceed to read the character
-		 * directly from input
-		 */
-		if (check_poll(indev))
-			return indev->op->poll(indev);
-		
-		/* No other way of interacting with user */
-		interrupts_disable();
-		
-		if (CPU)
-			printf("cpu%u: ", CPU->id);
-		else
-			printf("cpu: ");
-		printf("halted (no polling input)\n");
-		cpu_halt();
-	}
-	
-	waitq_sleep(&indev->wq);
-	ipl_t ipl = interrupts_disable();
-	spinlock_lock(&indev->lock);
-	wchar_t ch = indev->buffer[(indev->index - indev->counter) % INDEV_BUFLEN];
-	indev->counter--;
-	spinlock_unlock(&indev->lock);
-	interrupts_restore(ipl);
-	
-	return ch;
-}
-
 /** Get string from input character device.
  *
@@ -207,5 +172,5 @@
 	
 	wchar_t ch;
-	while ((ch = _getc(indev)) != '\n') {
+	while ((ch = indev_pop_character(indev)) != '\n') {
 		if (ch == '\b') {
 			if (count > 0) {
@@ -233,5 +198,5 @@
 wchar_t getc(indev_t *indev)
 {
-	wchar_t ch = _getc(indev);
+	wchar_t ch = indev_pop_character(indev);
 	putchar(ch);
 	return ch;
Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision 87d71bfd433990e95005f44f420e7d1538b52478)
+++ kernel/generic/src/console/kconsole.c	(revision 566f4cfb502715c66762e1fa7a0827f52ac83ec3)
@@ -246,5 +246,5 @@
 	
 	while (true) {
-		wchar_t ch = _getc(indev);
+		wchar_t ch = indev_pop_character(indev);
 		
 		if (ch == '\n') {
@@ -654,5 +654,5 @@
 	
 	if (kcon)
-		_getc(stdin);
+		indev_pop_character(stdin);
 	else
 		printf("Type \"exit\" to leave the console.\n");
