From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Hy9vI-0002vo-VO for mharc-grub-devel@gnu.org; Tue, 12 Jun 2007 13:12:52 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hy9vG-0002vF-P2 for grub-devel@gnu.org; Tue, 12 Jun 2007 13:12:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hy9vF-0002v3-Jm for grub-devel@gnu.org; Tue, 12 Jun 2007 13:12:50 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hy9vF-0002v0-CU for grub-devel@gnu.org; Tue, 12 Jun 2007 13:12:49 -0400 Received: from smtp-vbr13.xs4all.nl ([194.109.24.33]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hy9vF-0001Jh-5N for grub-devel@gnu.org; Tue, 12 Jun 2007 13:12:49 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr13.xs4all.nl (8.13.8/8.13.8) with ESMTP id l5CHClpi030825 for ; Tue, 12 Jun 2007 19:12:48 +0200 (CEST) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <466E8A1F.3090006@raulete.net> Mail-Copies-To: mgerards@xs4all.nl Date: Tue, 12 Jun 2007 19:19:09 +0200 In-Reply-To: <466E8A1F.3090006@raulete.net> (adrian15@raulete.net's message of "Tue, 12 Jun 2007 13:57:19 +0200") Message-ID: <87645tytte.fsf@xs4all.nl> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-kernel: FreeBSD 4.6-4.9 Subject: Re: Checking parametres that are not inside an option 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: Tue, 12 Jun 2007 17:12:50 -0000 adrian15 writes: > If you take a look at search.c you can see that the -s parametrer is > checked outside the command thanks to the ARG_TYPE_STRING constant. > > {"set", 's', GRUB_ARG_OPTION_OPTIONAL, "set a variable to the first > device found", "VAR", ARG_TYPE_STRING} > > > If I want not to check if an argument command that it IS NOT inside an > option is something (a disk, i.e.) or not... how do I do it? > > I mean I want something like: > > map (hd0) (hd1) > > to be checked outside the command without using: > > map -disk1 (hd0) -disk2 (hd1) > and the correspondent option definition at map.c > > how do I do it ? That's not possible with the current code. You would have to add such check yourself, which should not be too hard. -- Marco