Index: generic/src/console/cmd.c
===================================================================
--- generic/src/console/cmd.c	(revision 2cf87e50d5dcd3aefbd08693599d8fca4149537d)
+++ generic/src/console/cmd.c	(revision 93e90c7fda16ce9628a350f5a8c298bfc7831467)
@@ -49,4 +49,5 @@
 #include <mm/tlb.h>
 #include <arch/mm/tlb.h>
+#include <mm/frame.h>
 
 /** Data and methods for 'help' command. */
@@ -118,4 +119,5 @@
 	.argv = set4_argv
 };
+
 
 
@@ -242,4 +244,34 @@
 };
 
+
+/** Data and methods for 'zones' command */
+static int cmd_zones(cmd_arg_t *argv);
+static cmd_info_t zones_info = {
+	.name = "zones",
+	.description = "List of memory zones.",
+	.func = cmd_zones,
+	.argc = 0
+};
+
+/** Data and methods for 'zone' command */
+static int cmd_zone(cmd_arg_t *argv);
+static char zone_buf[MAX_CMDLINE+1];
+static cmd_arg_t zone_argv = {
+	.type = ARG_TYPE_INT,
+	.buffer = zone_buf,
+	.len = sizeof(zone_buf)
+};
+
+
+static cmd_info_t zone_info = {
+	.name = "zone",
+	.description = "Show memory zone structure.",
+	.func = cmd_zone,
+	.argc = 1,
+	.argv = &zone_argv
+};
+
+
+
 /** Initialize command info structure.
  *
@@ -299,4 +331,14 @@
 	if (!cmd_register(&ptlb_info))
 		panic("could not register command %s\n", ptlb_info.name);
+
+	cmd_initialize(&zones_info);
+	if (!cmd_register(&zones_info))
+		panic("could not register command %s\n", zones_info.name);
+
+	cmd_initialize(&zone_info);
+	if (!cmd_register(&zone_info))
+		panic("could not register command %s\n", zone_info.name);
+
+
 }
 
@@ -534,2 +576,13 @@
 	return 1;
 }
+
+
+int cmd_zones(cmd_arg_t * argv) {
+	printf("Zones listing not implemented\n");
+	return 1;
+}
+int cmd_zone(cmd_arg_t * argv) {
+	printf("Zone details not implemented\n");
+	return 1;
+}
+
Index: generic/src/console/kconsole.c
===================================================================
--- generic/src/console/kconsole.c	(revision 2cf87e50d5dcd3aefbd08693599d8fca4149537d)
+++ generic/src/console/kconsole.c	(revision 93e90c7fda16ce9628a350f5a8c298bfc7831467)
@@ -472,4 +472,5 @@
 	link_t *cur;
 	int i;
+	int error = 0;
 	
 	if (!parse_argument(cmdline, len, &start, &end)) {
@@ -521,4 +522,5 @@
 		}
 		
+		error = 0;
 		switch (cmd->argv[i].type) {
 		case ARG_TYPE_STRING:
@@ -530,5 +532,5 @@
 			if (parse_int_arg(cmdline+start, end-start+1, 
 					  &cmd->argv[i].intval))
-				return NULL;
+				error = 1;
 			break;
 		case ARG_TYPE_VAR:
@@ -545,5 +547,5 @@
 			else {
 				printf("Unrecognized variable argument.\n");
-				return NULL;
+				error = 1;
 			}
 			break;
@@ -551,7 +553,12 @@
 		default:
 			printf("invalid argument type\n");
-			return NULL;
+			error = 1;
 			break;
 		}
+	}
+	
+	if (error) {
+		spinlock_unlock(&cmd->lock);
+		return NULL;
 	}
 	
