Index: kernel/generic/src/console/chardev.c
===================================================================
--- kernel/generic/src/console/chardev.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ kernel/generic/src/console/chardev.c	(revision 5af6cf3d6b44b525ad694f194a5101ab4bd5e115)
@@ -68,5 +68,5 @@
 {
 	assert(indev);
-	
+
 	irq_spinlock_lock(&indev->lock, true);
 	if (indev->counter == INDEV_BUFLEN - 1) {
@@ -75,8 +75,8 @@
 		return;
 	}
-	
+
 	indev->counter++;
 	indev->buffer[indev->index++] = ch;
-	
+
 	/* Index modulo size of buffer */
 	indev->index = indev->index % INDEV_BUFLEN;
@@ -102,17 +102,17 @@
 		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);
 	irq_spinlock_lock(&indev->lock, true);
@@ -121,5 +121,5 @@
 	indev->counter--;
 	irq_spinlock_unlock(&indev->lock, true);
-	
+
 	return ch;
 }
@@ -158,8 +158,8 @@
 	if (indev == NULL)
 		return false;
-	
+
 	if (indev->op == NULL)
 		return false;
-	
+
 	return (indev->op->poll != NULL);
 }
Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ kernel/generic/src/console/cmd.c	(revision 5af6cf3d6b44b525ad694f194a5101ab4bd5e115)
@@ -686,5 +686,5 @@
 {
 	spinlock_lock(&cmd_lock);
-	
+
 	size_t len = 0;
 	list_foreach(cmd_list, link, cmd_info_t, hlp) {
@@ -694,5 +694,5 @@
 		spinlock_unlock(&hlp->lock);
 	}
-	
+
 	unsigned int _len = (unsigned int) len;
 	if ((_len != len) || (((int) _len) < 0)) {
@@ -700,5 +700,5 @@
 		return 1;
 	}
-	
+
 	list_foreach(cmd_list, link, cmd_info_t, hlp) {
 		spinlock_lock(&hlp->lock);
@@ -706,7 +706,7 @@
 		spinlock_unlock(&hlp->lock);
 	}
-	
+
 	spinlock_unlock(&cmd_lock);
-	
+
 	return 1;
 }
@@ -721,5 +721,5 @@
 {
 	uint8_t *ptr = NULL;
-	
+
 #ifdef IO_SPACE_BOUNDARY
 	if ((void *) argv->intval < IO_SPACE_BOUNDARY)
@@ -729,13 +729,13 @@
 		ptr = (uint8_t *) km_map(argv[0].intval, sizeof(uint8_t),
 		    PAGE_NOT_CACHEABLE);
-	
+
 	const uint8_t val = pio_read_8(ptr);
 	printf("read %" PRIxn ": %" PRIx8 "\n", argv[0].intval, val);
-	
+
 #ifdef IO_SPACE_BOUNDARY
 	if ((void *) argv->intval < IO_SPACE_BOUNDARY)
 		return 1;
 #endif
-	
+
 	km_unmap((uintptr_t) ptr, sizeof(uint8_t));
 	return 1;
@@ -751,5 +751,5 @@
 {
 	uint16_t *ptr = NULL;
-	
+
 #ifdef IO_SPACE_BOUNDARY
 	if ((void *) argv->intval < IO_SPACE_BOUNDARY)
@@ -759,13 +759,13 @@
 		ptr = (uint16_t *) km_map(argv[0].intval, sizeof(uint16_t),
 		    PAGE_NOT_CACHEABLE);
-	
+
 	const uint16_t val = pio_read_16(ptr);
 	printf("read %" PRIxn ": %" PRIx16 "\n", argv[0].intval, val);
-	
+
 #ifdef IO_SPACE_BOUNDARY
 	if ((void *) argv->intval < IO_SPACE_BOUNDARY)
 		return 1;
 #endif
-	
+
 	km_unmap((uintptr_t) ptr, sizeof(uint16_t));
 	return 1;
@@ -781,5 +781,5 @@
 {
 	uint32_t *ptr = NULL;
-	
+
 #ifdef IO_SPACE_BOUNDARY
 	if ((void *) argv->intval < IO_SPACE_BOUNDARY)
@@ -789,13 +789,13 @@
 		ptr = (uint32_t *) km_map(argv[0].intval, sizeof(uint32_t),
 		    PAGE_NOT_CACHEABLE);
-	
+
 	const uint32_t val = pio_read_32(ptr);
 	printf("read %" PRIxn ": %" PRIx32 "\n", argv[0].intval, val);
-	
+
 #ifdef IO_SPACE_BOUNDARY
 	if ((void *) argv->intval < IO_SPACE_BOUNDARY)
 		return 1;
 #endif
-	
+
 	km_unmap((uintptr_t) ptr, sizeof(uint32_t));
 	return 1;
@@ -811,5 +811,5 @@
 {
 	uint8_t *ptr = NULL;
-	
+
 #ifdef IO_SPACE_BOUNDARY
 	if ((void *) argv->intval < IO_SPACE_BOUNDARY)
@@ -819,14 +819,14 @@
 		ptr = (uint8_t *) km_map(argv[0].intval, sizeof(uint8_t),
 		    PAGE_NOT_CACHEABLE);
-	
+
 	printf("write %" PRIxn ": %" PRIx8 "\n", argv[0].intval,
 	    (uint8_t) argv[1].intval);
 	pio_write_8(ptr, (uint8_t) argv[1].intval);
-	
+
 #ifdef IO_SPACE_BOUNDARY
 	if ((void *) argv->intval < IO_SPACE_BOUNDARY)
 		return 1;
 #endif
-	
+
 	km_unmap((uintptr_t) ptr, sizeof(uint8_t));
 	return 1;
@@ -842,5 +842,5 @@
 {
 	uint16_t *ptr = NULL;
-	
+
 #ifdef IO_SPACE_BOUNDARY
 	if ((void *) argv->intval < IO_SPACE_BOUNDARY)
@@ -850,14 +850,14 @@
 		ptr = (uint16_t *) km_map(argv[0].intval, sizeof(uint16_t),
 		    PAGE_NOT_CACHEABLE);
-	
+
 	printf("write %" PRIxn ": %" PRIx16 "\n", argv[0].intval,
 	    (uint16_t) argv[1].intval);
 	pio_write_16(ptr, (uint16_t) argv[1].intval);
-	
+
 #ifdef IO_SPACE_BOUNDARY
 	if ((void *) argv->intval < IO_SPACE_BOUNDARY)
 		return 1;
 #endif
-	
+
 	km_unmap((uintptr_t) ptr, sizeof(uint16_t));
 	return 1;
@@ -873,5 +873,5 @@
 {
 	uint32_t *ptr = NULL;
-	
+
 #ifdef IO_SPACE_BOUNDARY
 	if ((void *) argv->intval < IO_SPACE_BOUNDARY)
@@ -881,14 +881,14 @@
 		ptr = (uint32_t *) km_map(argv[0].intval, sizeof(uint32_t),
 		    PAGE_NOT_CACHEABLE);
-	
+
 	printf("write %" PRIxn ": %" PRIx32 "\n", argv[0].intval,
 	    (uint32_t) argv[1].intval);
 	pio_write_32(ptr, (uint32_t) argv[1].intval);
-	
+
 #ifdef IO_SPACE_BOUNDARY
 	if ((void *) argv->intval < IO_SPACE_BOUNDARY)
 		return 1;
 #endif
-	
+
 	km_unmap((uintptr_t) ptr, sizeof(uint32_t));
 	return 1;
@@ -904,5 +904,5 @@
 {
 	reboot();
-	
+
 	/* Not reached */
 	return 1;
@@ -918,11 +918,11 @@
 {
 	assert(uptime);
-	
+
 	/* This doesn't have to be very accurate */
 	sysarg_t sec = uptime->seconds1;
-	
+
 	printf("Up %" PRIun " days, %" PRIun " hours, %" PRIun " minutes, %" PRIun " seconds\n",
 		sec / 86400, (sec % 86400) / 3600, (sec % 3600) / 60, sec % 60);
-	
+
 	return 1;
 }
@@ -937,8 +937,8 @@
 {
 	spinlock_lock(&cmd_lock);
-	
+
 	list_foreach(cmd_list, link, cmd_info_t, hlp) {
 		spinlock_lock(&hlp->lock);
-		
+
 		if (str_lcmp(hlp->name, (const char *) argv->buffer, str_length(hlp->name)) == 0) {
 			printf("%s - %s\n", hlp->name, hlp->description);
@@ -948,10 +948,10 @@
 			break;
 		}
-		
+
 		spinlock_unlock(&hlp->lock);
 	}
-	
+
 	spinlock_unlock(&cmd_lock);
-	
+
 	return 1;
 }
@@ -961,5 +961,5 @@
 {
 	symtab_print_search((char *) argv->buffer);
-	
+
 	return 1;
 }
@@ -1004,10 +1004,10 @@
 	 * call the function.
 	 */
-	
+
 	unsigned int i;
 	for (i = 0; i < config.cpu_count; i++) {
 		if (!cpus[i].active)
 			continue;
-		
+
 		thread_t *thread;
 		if ((thread = thread_create((void (*)(void *)) cmd_call0,
@@ -1021,5 +1021,5 @@
 			printf("Unable to create thread for cpu%u\n", i);
 	}
-	
+
 	return 1;
 }
@@ -1108,5 +1108,5 @@
 	fncptr_t fptr;
 	errno_t rc;
-	
+
 	symbol = (char *) argv->buffer;
 	rc = symtab_addr_lookup(symbol, &symaddr);
@@ -1183,5 +1183,5 @@
 	bool pointer = false;
 	errno_t rc;
-	
+
 	if (((char *) argv->buffer)[0] == '*') {
 		rc = symtab_addr_lookup((char *) argv->buffer + 1, &addr);
@@ -1195,5 +1195,5 @@
 	} else
 		rc = symtab_addr_lookup((char *) argv->buffer, &addr);
-	
+
 	if (rc == ENOENT)
 		printf("Symbol %s not found.\n", (char *) argv->buffer);
@@ -1210,5 +1210,5 @@
 	} else
 		printf("No symbol information available.\n");
-	
+
 	return 1;
 }
@@ -1252,5 +1252,5 @@
 	else
 		printf("Unknown argument \"%s\".\n", flag_buf);
-	
+
 	return 1;
 }
@@ -1270,5 +1270,5 @@
 	else
 		printf("Unknown argument \"%s\".\n", flag_buf);
-	
+
 	return 1;
 }
@@ -1412,5 +1412,5 @@
 	release_console();
 	indev_pop_character(stdin);
-	
+
 	return 1;
 }
@@ -1420,5 +1420,5 @@
 {
 	printf("%s (%s)\n", test->name, test->desc);
-	
+
 	/* Update and read thread accounting
 	   for benchmarking */
@@ -1427,9 +1427,9 @@
 	task_get_accounting(TASK, &ucycles0, &kcycles0);
 	irq_spinlock_unlock(&TASK->lock, true);
-	
+
 	/* Execute the test */
 	test_quiet = false;
 	const char *ret = test->entry();
-	
+
 	/* Update and read thread accounting */
 	uint64_t ucycles1, kcycles1;
@@ -1437,18 +1437,18 @@
 	task_get_accounting(TASK, &ucycles1, &kcycles1);
 	irq_spinlock_unlock(&TASK->lock, true);
-	
+
 	uint64_t ucycles, kcycles;
 	char usuffix, ksuffix;
 	order_suffix(ucycles1 - ucycles0, &ucycles, &usuffix);
 	order_suffix(kcycles1 - kcycles0, &kcycles, &ksuffix);
-	
+
 	printf("Time: %" PRIu64 "%c user cycles, %" PRIu64 "%c kernel cycles\n",
 	    ucycles, usuffix, kcycles, ksuffix);
-	
+
 	if (ret == NULL) {
 		printf("Test passed\n");
 		return true;
 	}
-	
+
 	printf("%s\n", ret);
 	return false;
@@ -1461,8 +1461,8 @@
 	uint64_t ucycles, kcycles;
 	char usuffix, ksuffix;
-	
+
 	if (cnt < 1)
 		return true;
-	
+
 	uint64_t *data = (uint64_t *) malloc(sizeof(uint64_t) * cnt, 0);
 	if (data == NULL) {
@@ -1470,8 +1470,8 @@
 		return false;
 	}
-	
+
 	for (i = 0; i < cnt; i++) {
 		printf("%s (%u/%u) ... ", test->name, i + 1, cnt);
-		
+
 		/* Update and read thread accounting
 		   for benchmarking */
@@ -1480,9 +1480,9 @@
 		task_get_accounting(TASK, &ucycles0, &kcycles0);
 		irq_spinlock_unlock(&TASK->lock, true);
-		
+
 		/* Execute the test */
 		test_quiet = true;
 		const char *test_ret = test->entry();
-		
+
 		/* Update and read thread accounting */
 		irq_spinlock_lock(&TASK->lock, true);
@@ -1490,5 +1490,5 @@
 		task_get_accounting(TASK, &ucycles1, &kcycles1);
 		irq_spinlock_unlock(&TASK->lock, true);
-		
+
 		if (test_ret != NULL) {
 			printf("%s\n", test_ret);
@@ -1496,5 +1496,5 @@
 			break;
 		}
-		
+
 		data[i] = ucycles1 - ucycles0 + kcycles1 - kcycles0;
 		order_suffix(ucycles1 - ucycles0, &ucycles, &usuffix);
@@ -1503,20 +1503,20 @@
 		    ucycles, usuffix, kcycles, ksuffix);
 	}
-	
+
 	if (ret) {
 		printf("\n");
-		
+
 		uint64_t sum = 0;
-		
+
 		for (i = 0; i < cnt; i++) {
 			sum += data[i];
 		}
-		
+
 		order_suffix(sum / (uint64_t) cnt, &ucycles, &usuffix);
 		printf("Average\t\t%" PRIu64 "%c\n", ucycles, usuffix);
 	}
-	
+
 	free(data);
-	
+
 	return ret;
 }
@@ -1526,10 +1526,10 @@
 	size_t len = 0;
 	test_t *test;
-	
+
 	for (test = tests; test->name != NULL; test++) {
 		if (str_length(test->name) > len)
 			len = str_length(test->name);
 	}
-	
+
 	unsigned int _len = (unsigned int) len;
 	if ((_len != len) || (((int) _len) < 0)) {
@@ -1537,9 +1537,9 @@
 		return;
 	}
-	
+
 	for (test = tests; test->name != NULL; test++)
 		printf("%-*s %s%s\n", _len, test->name, test->desc,
 		    (test->safe ? "" : " (unsafe)"));
-	
+
 	printf("%-*s Run all safe tests\n", _len, "*");
 }
@@ -1555,5 +1555,5 @@
 {
 	test_t *test;
-	
+
 	if (str_cmp((char *) argv->buffer, "*") == 0) {
 		for (test = tests; test->name != NULL; test++) {
@@ -1566,5 +1566,5 @@
 	} else if (str_cmp((char *) argv->buffer, "") != 0) {
 		bool fnd = false;
-		
+
 		for (test = tests; test->name != NULL; test++) {
 			if (str_cmp(test->name, (char *) argv->buffer) == 0) {
@@ -1574,10 +1574,10 @@
 			}
 		}
-		
+
 		if (!fnd)
 			printf("Unknown test\n");
 	} else
 		list_tests();
-	
+
 	return 1;
 }
@@ -1593,5 +1593,5 @@
 	test_t *test;
 	uint32_t cnt = argv[1].intval;
-	
+
 	if (str_cmp((char *) argv->buffer, "*") == 0) {
 		for (test = tests; test->name != NULL; test++) {
@@ -1603,22 +1603,22 @@
 	} else {
 		bool fnd = false;
-		
+
 		for (test = tests; test->name != NULL; test++) {
 			if (str_cmp(test->name, (char *) argv->buffer) == 0) {
 				fnd = true;
-				
+
 				if (test->safe)
 					run_bench(test, cnt);
 				else
 					printf("Unsafe test\n");
-				
+
 				break;
 			}
 		}
-		
+
 		if (!fnd)
 			printf("Unknown test\n");
 	}
-	
+
 	return 1;
 }
Index: kernel/generic/src/console/console.c
===================================================================
--- kernel/generic/src/console/console.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ kernel/generic/src/console/console.c	(revision 5af6cf3d6b44b525ad694f194a5101ab4bd5e115)
@@ -119,5 +119,5 @@
 		stdin = &stdin_sink;
 	}
-	
+
 	return stdin;
 }
@@ -143,5 +143,5 @@
 		stdout = &stdout_source;
 	}
-	
+
 	list_append(&outdev->link, &stdout->list);
 }
@@ -189,7 +189,7 @@
 {
 	void *faddr = (void *) KA2PA(kio);
-	
+
 	assert((uintptr_t) faddr % FRAME_SIZE == 0);
-	
+
 	kio_parea.pbase = (uintptr_t) faddr;
 	kio_parea.frames = SIZE2FRAMES(sizeof(kio));
@@ -197,8 +197,8 @@
 	kio_parea.mapped = false;
 	ddi_parea_register(&kio_parea);
-	
+
 	sysinfo_set_item_val("kio.faddr", NULL, (sysarg_t) faddr);
 	sysinfo_set_item_val("kio.pages", NULL, KIO_PAGES);
-	
+
 	event_set_unmask_callback(EVENT_KIO, kio_update);
 	atomic_set(&kio_inited, true);
@@ -209,9 +209,9 @@
 	event_notify_1(EVENT_KCONSOLE, false, true);
 	bool prev = console_override;
-	
+
 	console_override = true;
 	if ((stdout) && (stdout->op->redraw))
 		stdout->op->redraw(stdout);
-	
+
 	if ((stdin) && (!prev)) {
 		/*
@@ -256,5 +256,5 @@
 	size_t count = 0;
 	buf[offset] = 0;
-	
+
 	wchar_t ch;
 	while ((ch = indev_pop_character(indev)) != '\n') {
@@ -265,5 +265,5 @@
 				putchar(' ');
 				putchar('\b');
-				
+
 				count--;
 				offset = str_lsize(buf, count);
@@ -271,5 +271,5 @@
 			}
 		}
-		
+
 		if (chr_encode(ch, buf, &offset, buflen - 1) == EOK) {
 			putchar(ch);
@@ -278,5 +278,5 @@
 		}
 	}
-	
+
 	return count;
 }
@@ -294,7 +294,7 @@
 	if (!atomic_get(&kio_inited))
 		return;
-	
+
 	spinlock_lock(&kio_lock);
-	
+
 	if (kio_uspace > 0) {
 		if (event_notify_3(EVENT_KIO, true, kio_start, kio_len,
@@ -302,5 +302,5 @@
 			kio_uspace = 0;
 	}
-	
+
 	spinlock_unlock(&kio_lock);
 }
@@ -312,5 +312,5 @@
 {
 	bool ordy = ((stdout) && (stdout->op->write));
-	
+
 	if (!ordy)
 		return;
@@ -347,8 +347,8 @@
 	else
 		kio_start = (kio_start + 1) % KIO_LENGTH;
-	
+
 	if (kio_stored < kio_len)
 		kio_stored++;
-	
+
 	/* The character is stored for uspace */
 	if (kio_uspace < kio_len)
@@ -359,12 +359,12 @@
 {
 	bool ordy = ((stdout) && (stdout->op->write));
-	
+
 	spinlock_lock(&kio_lock);
 	kio_push_char(ch);
 	spinlock_unlock(&kio_lock);
-	
+
 	/* Output stored characters */
 	kio_flush();
-	
+
 	if (!ordy) {
 		/*
@@ -380,5 +380,5 @@
 		early_putchar(ch);
 	}
-	
+
 	/* Force notification on newline */
 	if (ch == '\n')
@@ -409,10 +409,10 @@
 	if (size > PAGE_SIZE)
 		return (sys_errno_t) ELIMIT;
-	
+
 	if (size > 0) {
 		data = (char *) malloc(size + 1, 0);
 		if (!data)
 			return (sys_errno_t) ENOMEM;
-		
+
 		rc = copy_from_uspace(data, buf, size);
 		if (rc) {
@@ -421,5 +421,5 @@
 		}
 		data[size] = 0;
-		
+
 		switch (cmd) {
 		case KIO_WRITE:
Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ kernel/generic/src/console/kconsole.c	(revision 5af6cf3d6b44b525ad694f194a5101ab4bd5e115)
@@ -98,5 +98,5 @@
 {
 	unsigned int i;
-	
+
 	cmd_init();
 	for (i = 0; i < KCONSOLE_HISTORY; i++)
@@ -114,5 +114,5 @@
 {
 	spinlock_lock(&cmd_lock);
-	
+
 	/*
 	 * Make sure the command is not already listed.
@@ -124,5 +124,5 @@
 			return false;
 		}
-		
+
 		/* Avoid deadlock. */
 		if (hlp < cmd) {
@@ -133,5 +133,5 @@
 			spinlock_lock(&hlp->lock);
 		}
-		
+
 		if (str_cmp(hlp->name, cmd->name) == 0) {
 			/* The command is already there. */
@@ -141,14 +141,14 @@
 			return false;
 		}
-		
+
 		spinlock_unlock(&hlp->lock);
 		spinlock_unlock(&cmd->lock);
 	}
-	
+
 	/*
 	 * Now the command can be added.
 	 */
 	list_append(&cmd->link, &cmd_list);
-	
+
 	spinlock_unlock(&cmd_lock);
 	return true;
@@ -168,27 +168,27 @@
 	link_t **startpos = (link_t**) ctx;
 	size_t namelen = str_length(name);
-	
+
 	spinlock_lock(&cmd_lock);
-	
+
 	if (*startpos == NULL)
 		*startpos = cmd_list.head.next;
-	
+
 	for (; *startpos != &cmd_list.head; *startpos = (*startpos)->next) {
 		cmd_info_t *hlp = list_get_instance(*startpos, cmd_info_t, link);
-		
+
 		const char *curname = hlp->name;
 		if (str_length(curname) < namelen)
 			continue;
-		
+
 		if (str_lcmp(curname, name, namelen) == 0) {
 			*startpos = (*startpos)->next;
 			if (h)
 				*h = hlp->description;
-			
+
 			spinlock_unlock(&cmd_lock);
 			return (curname + str_lsize(curname, namelen));
 		}
 	}
-	
+
 	spinlock_unlock(&cmd_lock);
 	return NULL;
@@ -207,7 +207,7 @@
 {
 	const char *name = input;
-	
+
 	size_t found = 0;
-	
+
 	/*
 	 * Maximum Match Length: Length of longest matching common
@@ -223,14 +223,14 @@
 	size_t total_hints_shown = 0;
 	bool continue_showing_hints = true;
-	
+
 	output[0] = 0;
-	
+
 	while ((hint = hints_enum(name, NULL, &pos))) {
 		if ((found == 0) || (str_length(hint) > str_length(output)))
 			str_cpy(output, MAX_CMDLINE, hint);
-		
+
 		found++;
 	}
-	
+
 	/*
 	 * If the number of possible completions is more than MAX_TAB_HINTS,
@@ -242,10 +242,10 @@
 		    console_prompt_display_all_hints(indev, found);
 	}
-	
+
 	if ((found > 1) && (str_length(output) != 0)) {
 		printf("\n");
 		pos = NULL;
 		while ((hint = hints_enum(name, &help, &pos))) {
-			
+
 			if (continue_showing_hints) {
 				if (help)
@@ -253,8 +253,8 @@
 				else
 					printf("%s%s\n", name, hint);
-				
+
 				--hints_to_show;
 				++total_hints_shown;
-				
+
 				if ((hints_to_show == 0) && (total_hints_shown != found)) {
 					/* Ask user to continue */
@@ -263,20 +263,20 @@
 				}
 			}
-			
+
 			for (max_match_len_tmp = 0;
 			    (output[max_match_len_tmp] ==
 			    hint[max_match_len_tmp]) &&
 			    (max_match_len_tmp < max_match_len); ++max_match_len_tmp);
-			
+
 			max_match_len = max_match_len_tmp;
 		}
-		
+
 		/* Keep only the characters common in all completions */
 		output[max_match_len] = 0;
 	}
-	
+
 	if (found > 0)
 		str_cpy(input, size, output);
-	
+
 	free(output);
 	return found;
@@ -288,22 +288,22 @@
 	size_t end;
 	char *tmp;
-	
+
 	while (isspace(cmdline[start]))
 		start++;
-	
+
 	end = start + 1;
-	
+
 	while (!isspace(cmdline[end]))
 		end++;
-	
+
 	tmp = malloc(STR_BOUNDS(end - start + 1), 0);
-	
+
 	wstr_to_str(tmp, end - start + 1, &cmdline[start]);
-	
+
 	spinlock_lock(&cmd_lock);
-	
+
 	list_foreach(cmd_list, link, cmd_info_t, hlp) {
 		spinlock_lock(&hlp->lock);
-		
+
 		if (str_cmp(hlp->name, tmp) == 0) {
 			spinlock_unlock(&hlp->lock);
@@ -312,11 +312,11 @@
 			return hlp;
 		}
-		
+
 		spinlock_unlock(&hlp->lock);
 	}
-	
+
 	free(tmp);
 	spinlock_unlock(&cmd_lock);
-	
+
 	return NULL;
 }
@@ -325,13 +325,13 @@
 {
 	printf("%s> ", prompt);
-	
+
 	size_t position = 0;
 	wchar_t *current = history[history_pos];
 	current[0] = 0;
 	char *tmp = malloc(STR_BOUNDS(MAX_CMDLINE), 0);
-	
+
 	while (true) {
 		wchar_t ch = indev_pop_character(indev);
-		
+
 		if (ch == '\n') {
 			/* Enter */
@@ -339,10 +339,10 @@
 			break;
 		}
-		
+
 		if (ch == '\b') {
 			/* Backspace */
 			if (position == 0)
 				continue;
-			
+
 			if (wstr_remove(current, position - 1)) {
 				position--;
@@ -353,14 +353,14 @@
 			}
 		}
-		
+
 		if (ch == '\t') {
 			/* Tab completion */
-			
+
 			/* Move to the end of the word */
 			for (; (current[position] != 0) && (!isspace(current[position]));
 			    position++)
 				putchar(current[position]);
-			
-			
+
+
 			/*
 			 * Find the beginning of the word
@@ -376,11 +376,11 @@
 				    (beg > 0) && (!isspace(current[beg]));
 				    beg--);
-				
+
 				if (isspace(current[beg]))
 					beg++;
-				
+
 				wstr_to_str(tmp, position - beg + 1, current + beg);
 			}
-			
+
 			/* Count which argument number are we tabbing (narg=0 is cmd) */
 			bool sp = false;
@@ -394,8 +394,8 @@
 					sp = false;
 			}
-			
+
 			if (narg && isspace(current[0]))
 				narg--;
-			
+
 			int found;
 			if (narg == 0) {
@@ -411,5 +411,5 @@
 				    cmd->hints_enum);
 			}
-			
+
 			if (found == 0)
 				continue;
@@ -424,8 +424,8 @@
 				if (!wstr_linsert(current, ch, position + i, MAX_CMDLINE))
 					break;
-				
+
 				i++;
 			}
-			
+
 			if (found > 1) {
 				/* No unique hint, list was printed */
@@ -436,11 +436,11 @@
 				continue;
 			}
-			
+
 			/* We have a hint */
-			
+
 			printf("%ls", current + position);
 			position += str_length(tmp);
 			print_cc('\b', wstr_length(current) - position);
-			
+
 			if (position == wstr_length(current)) {
 				/* Insert a space after the last completed argument */
@@ -452,5 +452,5 @@
 			continue;
 		}
-		
+
 		if (ch == U_LEFT_ARROW) {
 			/* Left */
@@ -461,5 +461,5 @@
 			continue;
 		}
-		
+
 		if (ch == U_RIGHT_ARROW) {
 			/* Right */
@@ -470,5 +470,5 @@
 			continue;
 		}
-		
+
 		if ((ch == U_UP_ARROW) || (ch == U_DOWN_ARROW)) {
 			/* Up, down */
@@ -476,5 +476,5 @@
 			print_cc(' ', wstr_length(current));
 			print_cc('\b', wstr_length(current));
-			
+
 			if (ch == U_UP_ARROW) {
 				/* Up */
@@ -493,5 +493,5 @@
 			continue;
 		}
-		
+
 		if (ch == U_HOME_ARROW) {
 			/* Home */
@@ -500,5 +500,5 @@
 			continue;
 		}
-		
+
 		if (ch == U_END_ARROW) {
 			/* End */
@@ -507,10 +507,10 @@
 			continue;
 		}
-		
+
 		if (ch == U_DELETE) {
 			/* Delete */
 			if (position == wstr_length(current))
 				continue;
-			
+
 			if (wstr_remove(current, position)) {
 				printf("%ls ", current + position);
@@ -519,5 +519,5 @@
 			continue;
 		}
-		
+
 		if (wstr_linsert(current, ch, position, MAX_CMDLINE)) {
 			printf("%ls", current + position);
@@ -526,10 +526,10 @@
 		}
 	}
-	
+
 	if (wstr_length(current) > 0) {
 		history_pos++;
 		history_pos = history_pos % KCONSOLE_HISTORY;
 	}
-	
+
 	free(tmp);
 	return current;
@@ -546,5 +546,5 @@
 	bool isaddr = false;
 	bool isptr = false;
-	
+
 	/* If we get a name, try to find it in symbol table */
 	if (text[0] == '&') {
@@ -557,9 +557,9 @@
 		len--;
 	}
-	
+
 	if ((text[0] < '0') || (text[0] > '9')) {
 		char symname[MAX_SYMBOL_NAME];
 		str_ncpy(symname, MAX_SYMBOL_NAME, text, len + 1);
-		
+
 		uintptr_t symaddr;
 		errno_t rc = symtab_addr_lookup(symname, &symaddr);
@@ -611,5 +611,5 @@
 		}
 	}
-	
+
 	return true;
 }
@@ -635,10 +635,10 @@
 	assert(start != NULL);
 	assert(end != NULL);
-	
+
 	bool found_start = false;
 	size_t offset = *start;
 	size_t prev = *start;
 	wchar_t ch;
-	
+
 	while ((ch = str_decode(cmdline, &offset, size)) != 0) {
 		if (!found_start) {
@@ -651,9 +651,9 @@
 				break;
 		}
-		
+
 		prev = offset;
 	}
 	*end = prev;
-	
+
 	return found_start;
 }
@@ -676,10 +676,10 @@
 	}
 	spinlock_lock(&cmd_lock);
-	
+
 	cmd_info_t *cmd = NULL;
-	
+
 	list_foreach(cmd_list, link, cmd_info_t, hlp) {
 		spinlock_lock(&hlp->lock);
-		
+
 		if (str_lcmp(hlp->name, cmdline + start,
 		    max(str_length(hlp->name),
@@ -688,10 +688,10 @@
 			break;
 		}
-		
+
 		spinlock_unlock(&hlp->lock);
 	}
-	
+
 	spinlock_unlock(&cmd_lock);
-	
+
 	if (!cmd) {
 		/* Unknown command. */
@@ -699,7 +699,7 @@
 		return NULL;
 	}
-	
+
 	/* cmd == hlp is locked */
-	
+
 	/*
 	 * The command line must be further analyzed and
@@ -708,10 +708,10 @@
 	 * structure.
 	 */
-	
+
 	bool error = false;
 	size_t i;
 	for (i = 0; i < cmd->argc; i++) {
 		char *buf;
-		
+
 		start = end;
 		if (!parse_argument(cmdline, size, &start, &end)) {
@@ -721,10 +721,10 @@
 				continue;
 			}
-			
+
 			printf("Too few arguments.\n");
 			spinlock_unlock(&cmd->lock);
 			return NULL;
 		}
-		
+
 		switch (cmd->argv[i].type) {
 		case ARG_TYPE_STRING:
@@ -767,10 +767,10 @@
 		}
 	}
-	
+
 	if (error) {
 		spinlock_unlock(&cmd->lock);
 		return NULL;
 	}
-	
+
 	start = end;
 	if (parse_argument(cmdline, size, &start, &end)) {
@@ -779,5 +779,5 @@
 		return NULL;
 	}
-	
+
 	spinlock_unlock(&cmd->lock);
 	return cmd;
@@ -798,13 +798,13 @@
 		return;
 	}
-	
+
 	if (msg)
 		printf("%s", msg);
-	
+
 	if (kcon)
 		indev_pop_character(stdin);
 	else
 		printf("Type \"exit\" to leave the console.\n");
-	
+
 	char *cmdline = malloc(STR_BOUNDS(MAX_CMDLINE), 0);
 	while (true) {
@@ -813,14 +813,14 @@
 		if (!len)
 			continue;
-		
+
 		wstr_to_str(cmdline, STR_BOUNDS(MAX_CMDLINE), tmp);
-		
+
 		if ((!kcon) && (len == 4) && (str_lcmp(cmdline, "exit", 4) == 0))
 			break;
-		
+
 		cmd_info_t *cmd_info = parse_cmdline(cmdline, STR_BOUNDS(MAX_CMDLINE));
 		if (!cmd_info)
 			continue;
-		
+
 		(void) cmd_info->func(cmd_info->argv);
 	}
Index: kernel/generic/src/console/prompt.c
===================================================================
--- kernel/generic/src/console/prompt.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ kernel/generic/src/console/prompt.c	(revision 5af6cf3d6b44b525ad694f194a5101ab4bd5e115)
@@ -52,15 +52,15 @@
 	assert(indev);
 	assert(hints > 0);
-	
+
 	printf("Display all %zu possibilities? (y or n) ", hints);
-	
+
 	while (true) {
 		wchar_t answer = indev_pop_character(indev);
-		
+
 		if ((answer == 'y') || (answer == 'Y')) {
 			printf("y");
 			return true;
 		}
-		
+
 		if ((answer == 'n') || (answer == 'N')) {
 			printf("n");
@@ -84,5 +84,5 @@
 	assert(indev);
 	assert(display_hints != NULL);
-	
+
 	printf("--More--");
 	while (true) {
@@ -95,5 +95,5 @@
 			break;
 		}
-		
+
 		/* Stop displaying hints? */
 		if ((continue_showing_hints == 'n') ||
@@ -104,5 +104,5 @@
 			break;
 		}
-		
+
 		/* Show one more hint? */
 		if (continue_showing_hints == '\n') {
@@ -111,8 +111,8 @@
 		}
 	}
-	
+
 	/* Delete the --More-- option */
 	printf("\r         \r");
-	
+
 	return *display_hints > 0;
 }
