a5bd9f6
From 134e4df1335b0498684d093b55332f87c2e8a301 Mon Sep 17 00:00:00 2001
a5bd9f6
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
a5bd9f6
Date: Mon, 2 Jul 2012 11:31:31 +0200
a5bd9f6
Subject: [PATCH 009/364] 	* grub-core/lib/legacy_parse.c: Support clear
a5bd9f6
 and testload.
a5bd9f6
a5bd9f6
---
a5bd9f6
 ChangeLog                    |  4 ++++
a5bd9f6
 grub-core/lib/legacy_parse.c | 14 +++++++++++++-
a5bd9f6
 2 files changed, 17 insertions(+), 1 deletion(-)
a5bd9f6
a5bd9f6
diff --git a/ChangeLog b/ChangeLog
a5bd9f6
index 5f73c88..e606116 100644
a5bd9f6
--- a/ChangeLog
a5bd9f6
+++ b/ChangeLog
a5bd9f6
@@ -1,5 +1,9 @@
a5bd9f6
 2012-07-02  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
 
a5bd9f6
+	* grub-core/lib/legacy_parse.c: Support clear and testload.
a5bd9f6
+
a5bd9f6
+2012-07-02  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
+
a5bd9f6
 	* grub-core/term/efi/serial.c: Support 1.5 stop bits.
a5bd9f6
 
a5bd9f6
 2012-07-02  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
diff --git a/grub-core/lib/legacy_parse.c b/grub-core/lib/legacy_parse.c
a5bd9f6
index 14768b8..ddfaec4 100644
a5bd9f6
--- a/grub-core/lib/legacy_parse.c
a5bd9f6
+++ b/grub-core/lib/legacy_parse.c
a5bd9f6
@@ -65,6 +65,7 @@ struct legacy_command
a5bd9f6
  */
a5bd9f6
 static struct legacy_command legacy_commands[] =
a5bd9f6
   {
a5bd9f6
+    /* FIXME: background unsupported.  */
a5bd9f6
     {"blocklist", "blocklist '%s'\n", NULL, 0, 1, {TYPE_FILE}, 0, "FILE",
a5bd9f6
      "Print the blocklist notation of the file FILE."},
a5bd9f6
     {"boot", "boot\n", NULL, 0, 0, {}, 0, 0,
a5bd9f6
@@ -82,6 +83,8 @@ static struct legacy_command legacy_commands[] =
a5bd9f6
      2, {TYPE_FORCE_OPTION, TYPE_FILE}, 0, "[--force] FILE",
a5bd9f6
      "Load the chain-loader FILE. If --force is specified, then load it"
a5bd9f6
      " forcibly, whether the boot loader signature is present or not."},
a5bd9f6
+    {"clear", "clear\n", NULL, 0, 0, {}, 0, 0,
a5bd9f6
+     "Clear the screen."},
a5bd9f6
     {"cmp", "cmp '%s' '%s'\n", NULL, 0,
a5bd9f6
      2, {TYPE_FILE, TYPE_FILE}, FLAG_IGNORE_REST, "FILE1 FILE2",
a5bd9f6
      "Compare the file FILE1 with the FILE2 and inform the different values"
a5bd9f6
@@ -125,6 +128,7 @@ static struct legacy_command legacy_commands[] =
a5bd9f6
     {"displaymem", "lsmmap\n", NULL, 0, 0, {}, 0, 0, 
a5bd9f6
      "Display what GRUB thinks the system address space map of the"
a5bd9f6
      " machine is, including all regions of physical RAM installed."},
a5bd9f6
+    /* FIXME: device and efimap unsupported.  */
a5bd9f6
     /* NOTE: embed unsupported.  */
a5bd9f6
     {"fallback", "set fallback='%s'\n", NULL, 0,
a5bd9f6
      1, {TYPE_VERBATIM}, 0, "NUM...",
a5bd9f6
@@ -136,6 +140,8 @@ static struct legacy_command legacy_commands[] =
a5bd9f6
     {"find", "search -f '%s'\n", NULL, 0, 1, {TYPE_FILE}, 0, "FILENAME",
a5bd9f6
      "Search for the filename FILENAME in all of partitions and print the list of"
a5bd9f6
      " the devices which contain the file."},
a5bd9f6
+    /* FIXME: findiso unsupported.  */
a5bd9f6
+    /* FIXME: foreground unsupported.  */
a5bd9f6
     /* FIXME: fstest unsupported.  */
a5bd9f6
     /* NOTE: The obsolete C/H/S geometry isn't shown anymore.  */
a5bd9f6
     {"geometry", "insmod regexp; ls -l (%s*)\n", NULL, 0, 1, {TYPE_VERBATIM}, 0, "DRIVE",
a5bd9f6
@@ -243,6 +249,7 @@ static struct legacy_command legacy_commands[] =
a5bd9f6
     {"pause", "echo %s; if ! sleep -i 60; then return; fi\n", NULL, 0, 1,
a5bd9f6
      {TYPE_REST_VERBATIM}, 0,
a5bd9f6
      "[MESSAGE ...]", "Print MESSAGE, then wait until a key is pressed."},
a5bd9f6
+    /* FIXME: quit unsupported.  */
a5bd9f6
     /* FIXME: rarp unsupported.  */
a5bd9f6
     {"read", "read_dword %s\n", NULL, 0, 1, {TYPE_INT}, 0, "ADDR",
a5bd9f6
      "Read a 32-bit value from memory at address ADDR and"
a5bd9f6
@@ -288,11 +295,14 @@ static struct legacy_command legacy_commands[] =
a5bd9f6
      " STOP is the length of stop bit(s). The option --device can be used only"
a5bd9f6
      " in the grub shell, which specifies the file name of a tty device. The"
a5bd9f6
      " default values are COM1, 9600, 8N1."},
a5bd9f6
+    /* FIXME: silent unsupported.  */
a5bd9f6
+    /* FIXME: splashimage unsupported.  */
a5bd9f6
     /* FIXME: setkey unsupported.  */    /* NUL_TERMINATE */
a5bd9f6
     /* NOTE: setup unsupported.  */
a5bd9f6
     /* FIXME: --no-echo, --no-edit unsupported.  */
a5bd9f6
     /* NOTE: both terminals are activated so --silent and --timeout
a5bd9f6
        are useless.  */
a5bd9f6
+    /* FIXME: graphics unsupported.  */
a5bd9f6
     {"terminal", NULL, NULL, 0, 0, {}, FLAG_TERMINAL | FLAG_IGNORE_REST,
a5bd9f6
      "[--dumb] [--no-echo] [--no-edit] [--timeout=SECS] [--lines=LINES] "
a5bd9f6
      "[--silent] [console] [serial] [hercules]",
a5bd9f6
@@ -307,7 +317,7 @@ static struct legacy_command legacy_commands[] =
a5bd9f6
      " seconds. The option --lines specifies the maximum number of lines."
a5bd9f6
      " The option --silent is used to suppress messages."},
a5bd9f6
     /* FIXME: terminfo unsupported.  */    /* NUL_TERMINATE */
a5bd9f6
-    {"testload", "cat '%s'\n", NULL, 0, 1, {TYPE_FILE}, 0, "FILE",
a5bd9f6
+    {"testload", "testload '%s'\n", NULL, 0, 1, {TYPE_FILE}, 0, "FILE",
a5bd9f6
      "Read the entire contents of FILE in several different ways and"
a5bd9f6
      " compares them, to test the filesystem code. "
a5bd9f6
      " If this test succeeds, then a good next"
a5bd9f6
@@ -334,6 +344,8 @@ static struct legacy_command legacy_commands[] =
a5bd9f6
      " the information about only the mode."},
a5bd9f6
     {"vbeprobe", "insmod vbe; videoinfo\n", NULL, 0, 0, {},
a5bd9f6
      FLAG_FALLBACK, NULL, NULL}
a5bd9f6
+    /* FIXME: verbose unsupported.  */
a5bd9f6
+    /* FIXME: version unsupported.  */
a5bd9f6
   };
a5bd9f6
 
a5bd9f6
 char *
a5bd9f6
-- 
a5bd9f6
1.8.1.4
a5bd9f6