From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MkM5W-00080J-OG for mharc-grub-devel@gnu.org; Sun, 06 Sep 2009 14:03:42 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MkM5U-0007yg-9b for grub-devel@gnu.org; Sun, 06 Sep 2009 14:03:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MkM5P-0007wP-3Y for grub-devel@gnu.org; Sun, 06 Sep 2009 14:03:39 -0400 Received: from [199.232.76.173] (port=38254 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MkM5O-0007wL-UO for grub-devel@gnu.org; Sun, 06 Sep 2009 14:03:34 -0400 Received: from moutng.kundenserver.de ([212.227.126.188]:60484) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MkM5O-00027L-2K for grub-devel@gnu.org; Sun, 06 Sep 2009 14:03:34 -0400 Received: from [85.180.47.88] (e180047088.adsl.alicedsl.de [85.180.47.88]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MKv5w-1MkM5M20ET-0004ns; Sun, 06 Sep 2009 20:03:32 +0200 From: Felix Zielcke To: The development of GRUB 2 Content-Type: text/plain Date: Sun, 06 Sep 2009 20:03:31 +0200 Message-Id: <1252260211.3895.79.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.27.91 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX19P1b8jwnG1j2+u/Dun7jU7Mc6DiVGm5aDEsRU rE2UFJlDwjEdDJpJDIh4v6jzi14KmV2WU7mwIpMS7v49gOOUUZ 0ViYAkndLL97mx0Jn0Y3Q== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [PATCH] hide `Try 'help' for usage' if help doestn't exist in rescue mode X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2009 18:03:40 -0000 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 worth. It's so small I don't bother to attach it: 2009-09-06 Felix Zielcke * 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 getline) else { 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"); } quit: -- Felix Zielcke Proud Debian Maintainer