From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Huqxf-0006Gj-PM for mharc-grub-devel@gnu.org; Sun, 03 Jun 2007 10:21:39 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Huqxe-0006C2-1Z for grub-devel@gnu.org; Sun, 03 Jun 2007 10:21:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Huqxd-00069B-3u for grub-devel@gnu.org; Sun, 03 Jun 2007 10:21:37 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Huqxc-00068m-VS for grub-devel@gnu.org; Sun, 03 Jun 2007 10:21:36 -0400 Received: from 245.red-80-24-127.staticip.rima-tde.net ([80.24.127.245] helo=manazas.ensanjose.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Huqxc-0004Kf-Aw for grub-devel@gnu.org; Sun, 03 Jun 2007 10:21:36 -0400 Received: from localhost (manazas.ensanjose.net [127.0.0.1]) by manazas.ensanjose.net (Postfix) with ESMTP id A46A9D444D for ; Sun, 3 Jun 2007 16:21:34 +0200 (CEST) Received: from manazas.ensanjose.net ([127.0.0.1]) by localhost (manazas.ensanjose.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19856-04 for ; Sun, 3 Jun 2007 16:21:34 +0200 (CEST) Received: from [192.168.161.251] (131.Red-213-96-108.staticIP.rima-tde.net [213.96.108.131]) by manazas.ensanjose.net (Postfix) with ESMTP id 2ADDBD32AE for ; Sun, 3 Jun 2007 16:21:33 +0200 (CEST) Message-ID: <46622EA6.904@raulete.net> Date: Sun, 03 Jun 2007 04:59:50 +0200 From: adrian15 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: grub-devel@gnu.org References: <200706021604.l52G4Ar4014398@correoredir01.dinaserver.com> In-Reply-To: <200706021604.l52G4Ar4014398@correoredir01.dinaserver.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-kernel: Linux 2.4-2.6 Subject: Re: test -e patch 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, 03 Jun 2007 14:21:38 -0000 >> GRUB_MOD_INIT(test) >> { >> (void)mod; /* To stop warning. */ >> grub_register_command ("[", grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE, >> "[ EXPRESSION ]", "Evaluate an expression", 0); >> grub_register_command ("test", grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE, >> "test EXPRESSION", "Evaluate an expression", 0); >> } > > I understand this register commands. I suppose this information is read > from the help command or it isn't ? > > Or maybe it also reads from: > static const struct grub_arg_option options ? I've found it. It reads from the register command and ALSO from options IF you tell it to do so with: (void)mod; /* To stop warning. */ grub_register_command ("[", grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE, "[ EXPRESSION ]", "Evaluate an expression", options); grub_register_command ("test", grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE, "test EXPRESSION", "Evaluate an expression", options); adrian15