Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ kernel/generic/src/console/cmd.c	(revision e59627eaf65b5ba58ffa5dd24b415ce55dbb1495)
@@ -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;
 }
