Index: kernel/generic/include/console/prompt.h
===================================================================
--- kernel/generic/include/console/prompt.h	(revision f0d7bd959c3be29cd9d56901480b064516cd54ec)
+++ kernel/generic/include/console/prompt.h	(revision f0d7bd959c3be29cd9d56901480b064516cd54ec)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2012 Vojtech Horky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup genericconsole
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_CONSOLE_PROMPT_H_
+#define KERN_CONSOLE_PROMPT_H_
+
+#include <console/chardev.h>
+
+#define MAX_TAB_HINTS 37
+
+extern bool console_prompt_more_hints(indev_t *, size_t *);
+
+#endif
+
+/** @}
+ */
Index: kernel/generic/include/symtab.h
===================================================================
--- kernel/generic/include/symtab.h	(revision 1e01a353860b7e227c355a8a681a76dac240bfd7)
+++ kernel/generic/include/symtab.h	(revision f0d7bd959c3be29cd9d56901480b064516cd54ec)
@@ -36,6 +36,4 @@
 #define KERN_SYMTAB_H_
 
-#define MAX_TAB_HINTS 37
-
 #include <symtab_lookup.h>
 #include <console/chardev.h>
Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision 1e01a353860b7e227c355a8a681a76dac240bfd7)
+++ kernel/generic/src/console/kconsole.c	(revision f0d7bd959c3be29cd9d56901480b064516cd54ec)
@@ -43,4 +43,5 @@
 #include <console/chardev.h>
 #include <console/cmd.h>
+#include <console/prompt.h>
 #include <print.h>
 #include <panic.h>
@@ -214,8 +215,7 @@
 	const char *hint;
 	char *output = malloc(MAX_CMDLINE, 0);
-	char display = 'y';
 	size_t hints_to_show = MAX_TAB_HINTS - 1;
 	size_t total_hints_shown = 0;
-	char continue_showing_hints = 'y';
+	bool continue_showing_hints = true;
 	
 	output[0] = 0;
@@ -232,7 +232,9 @@
 	if (found > MAX_TAB_HINTS) {
 		printf("\nDisplay all %zu possibilities? (y or n)", found);
+		wchar_t display;
 		do {
 			display = indev_pop_character(indev);
 		} while (display != 'y' && display != 'n' && display != 'Y' && display != 'N');
+		continue_showing_hints = (display == 'y') || (display == 'Y');
 	}
 	
@@ -243,5 +245,5 @@
 			cmd_info_t *hlp = list_get_instance(pos, cmd_info_t, link);
 
-			if (display == 'y' || display == 'Y') { /* We are still showing hints */
+			if (continue_showing_hints) {
 				printf("%s (%s)\n", hlp->name, hlp->description);
 				--hints_to_show;
@@ -249,26 +251,5 @@
 
 				if (hints_to_show == 0 && total_hints_shown != found) { /* Time to ask user to continue */
-					printf("--More--");
-					do {
-						continue_showing_hints = indev_pop_character(indev);
-						if (continue_showing_hints == 'y' || continue_showing_hints == 'Y'
-								|| continue_showing_hints == ' ') {
-							hints_to_show = MAX_TAB_HINTS - 1; /* Display a full page again */
-							break;
-						}
-
-						if (continue_showing_hints == 'n' || continue_showing_hints == 'N'
-								|| continue_showing_hints == 'q' || continue_showing_hints == 'Q') {
-							display = 'n'; /* Stop displaying hints */
-							break;
-						}
-
-						if (continue_showing_hints == '\n') {
-							hints_to_show = 1; /* Show one more hint */
-							break;
-						}
-					} while (1);
-
-					printf("\r         \r"); /* Delete the --More-- option */
+					continue_showing_hints = console_prompt_more_hints(indev, &hints_to_show);
 				}
 			}
Index: kernel/generic/src/console/prompt.c
===================================================================
--- kernel/generic/src/console/prompt.c	(revision f0d7bd959c3be29cd9d56901480b064516cd54ec)
+++ kernel/generic/src/console/prompt.c	(revision f0d7bd959c3be29cd9d56901480b064516cd54ec)
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2012 Sandeep Kumar
+ * Copyright (c) 2012 Vojtech Horky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup genericconsole
+ * @{
+ */
+
+/**
+ * @file
+ * @brief Kernel console special prompts.
+ */
+
+#include <console/prompt.h>
+
+bool console_prompt_more_hints(indev_t *indev, size_t *display_hints)
+{
+	ASSERT(display_hints != NULL);
+
+	printf("--More--");
+	while (true) {
+		wchar_t continue_showing_hints = indev_pop_character(indev);
+		/* Display a full page again? */
+		if (continue_showing_hints == 'y'
+				|| continue_showing_hints == 'Y'
+				|| continue_showing_hints == ' ') {
+			*display_hints = MAX_TAB_HINTS - 1;
+			break;
+		}
+
+		/* Stop displaying hints? */
+		if (continue_showing_hints == 'n'
+				|| continue_showing_hints == 'N'
+				|| continue_showing_hints == 'q'
+				|| continue_showing_hints == 'Q') {
+			*display_hints = 0;
+			break;
+		}
+
+		/* Show one more hint? */
+		if (continue_showing_hints == '\n') {
+			*display_hints = 1;
+			break;
+		}
+	}
+
+	/* Delete the --More-- option */
+	printf("\r         \r");
+
+	return *display_hints > 0;
+}
+
+/** @}
+ */
Index: kernel/generic/src/debug/symtab.c
===================================================================
--- kernel/generic/src/debug/symtab.c	(revision 1e01a353860b7e227c355a8a681a76dac240bfd7)
+++ kernel/generic/src/debug/symtab.c	(revision f0d7bd959c3be29cd9d56901480b064516cd54ec)
@@ -43,4 +43,5 @@
 #include <typedefs.h>
 #include <errno.h>
+#include <console/prompt.h>
 
 /** Get name of a symbol that seems most likely to correspond to address.
@@ -232,8 +233,7 @@
 	size_t input_len = str_length(input);
 	char *sym_name;
-	char display = 'y';
 	size_t hints_to_show = MAX_TAB_HINTS - 1;
 	size_t total_hints_shown = 0;
-	char continue_showing_hints = 'y';
+	bool continue_showing_hints = true;
 	
 	output[0] = 0;
@@ -256,7 +256,9 @@
 	if (found > MAX_TAB_HINTS) {
 		printf("\nDisplay all %zu possibilities? (y or n)", found);
+		wchar_t display;
 		do {
 			display = indev_pop_character(indev);
 		} while (display != 'y' && display != 'n' && display != 'Y' && display != 'N');
+		continue_showing_hints = (display == 'y') || (display == 'Y');
 	}
 	
@@ -268,5 +270,5 @@
 			pos++;
 
-			if (display == 'y' || display == 'Y') { /* We are still showing hints */
+			if (continue_showing_hints) { /* We are still showing hints */
 				printf("%s\n", sym_name);
 				--hints_to_show;
@@ -274,26 +276,5 @@
 
 				if (hints_to_show == 0 && total_hints_shown != found) { /* Time to ask user to continue */
-					printf("--More--");
-					do {
-						continue_showing_hints = indev_pop_character(indev);
-						if (continue_showing_hints == 'y' || continue_showing_hints == 'Y'
-								|| continue_showing_hints == ' ') {
-							hints_to_show = MAX_TAB_HINTS - 1; /* Display a full page again */
-							break;
-						}
-
-						if (continue_showing_hints == 'n' || continue_showing_hints == 'N'
-								|| continue_showing_hints == 'q' || continue_showing_hints == 'Q') {
-							display = 'n'; /* Stop displaying hints */
-							break;
-						}
-
-						if (continue_showing_hints == '\n') {
-							hints_to_show = 1; /* Show one more hint */
-							break;
-						}
-					} while (1);
-
-					printf("\r         \r"); /* Delete the --More-- option */
+					continue_showing_hints = console_prompt_more_hints(indev, &hints_to_show);
 				}
 			}
