Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision 96b02eb9b2f96f3843b8275c254c43a9cb6c8c88)
+++ kernel/generic/src/console/kconsole.c	(revision 41ff85bc9c7b95866ea76ea1a6e64fc07d7bf10e)
@@ -84,5 +84,5 @@
 
 SPINLOCK_INITIALIZE(cmd_lock);  /**< Lock protecting command list. */
-LIST_INITIALIZE(cmd_head);      /**< Command list. */
+LIST_INITIALIZE(cmd_list);      /**< Command list. */
 
 static wchar_t history[KCONSOLE_HISTORY][MAX_CMDLINE] = {};
@@ -113,6 +113,4 @@
 bool cmd_register(cmd_info_t *cmd)
 {
-	link_t *cur;
-	
 	spinlock_lock(&cmd_lock);
 	
@@ -120,5 +118,5 @@
 	 * Make sure the command is not already listed.
 	 */
-	for (cur = cmd_head.next; cur != &cmd_head; cur = cur->next) {
+	list_foreach(cmd_list, cur) {
 		cmd_info_t *hlp = list_get_instance(cur, cmd_info_t, link);
 		
@@ -153,5 +151,5 @@
 	 * Now the command can be added.
 	 */
-	list_append(&cmd->link, &cmd_head);
+	list_append(&cmd->link, &cmd_list);
 	
 	spinlock_unlock(&cmd_lock);
@@ -176,7 +174,7 @@
 	
 	if (*startpos == NULL)
-		*startpos = cmd_head.next;
-	
-	for (; *startpos != &cmd_head; *startpos = (*startpos)->next) {
+		*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);
 		
@@ -559,7 +557,6 @@
 	
 	cmd_info_t *cmd = NULL;
-	link_t *cur;
-	
-	for (cur = cmd_head.next; cur != &cmd_head; cur = cur->next) {
+	
+	list_foreach(cmd_list, cur) {
 		cmd_info_t *hlp = list_get_instance(cur, cmd_info_t, link);
 		spinlock_lock(&hlp->lock);
