[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] hide `Try 'help' for usage' if help doestn't exist in rescue mod

From: Felix Zielcke
Subject: [PATCH] hide `Try 'help' for usage' if help doestn't exist in rescue mode
Date: Sun, 06 Sep 2009 20:03:31 +0200

I think we shouldn't tell users to type `help' if the command doestn't
exist in rescue mode, i.e. minicmd isn't included in core.img
This increases the size of kernel.img for me by 28 bytes. I think it's

It's so small I don't bother to attach it:

2009-09-06  Felix Zielcke  <address@hidden>

        * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
        `help' if the command exists.

diff --git a/kern/rescue_parser.c b/kern/rescue_parser.c
index 79f32b8..1e0841e 100644
--- a/kern/rescue_parser.c
+++ b/kern/rescue_parser.c
@@ -61,7 +61,8 @@ grub_rescue_parse_line (char *line, grub_reader_getline_t 
       grub_printf ("Unknown command `%s'\n", name);
-      grub_printf ("Try `help' for usage\n");
+      if (grub_command_find ("help"))
+       grub_printf ("Try `help' for usage\n");

Felix Zielcke
Proud Debian Maintainer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]