From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JEWzq-0004lA-4q for mharc-grub-devel@gnu.org; Mon, 14 Jan 2008 16:37:30 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JEWzo-0004kk-4Q for grub-devel@gnu.org; Mon, 14 Jan 2008 16:37:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JEWzl-0004kO-N3 for grub-devel@gnu.org; Mon, 14 Jan 2008 16:37:26 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEWzl-0004kL-H9 for grub-devel@gnu.org; Mon, 14 Jan 2008 16:37:25 -0500 Received: from mailout08.sul.t-online.de ([194.25.134.20] helo=mailout08.sul.t-online.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JEWzl-000414-Hi for grub-devel@gnu.org; Mon, 14 Jan 2008 16:37:25 -0500 Received: from fwd29.aul.t-online.de by mailout08.sul.t-online.com with smtp id 1JEWzj-0004tT-04; Mon, 14 Jan 2008 22:37:23 +0100 Received: from [10.3.2.2] (rCh6E2ZJghOHHAeXPjUvFGk21oFTU+-Se9YGD30RBHZEiNf3rm1-sd1zgRAmqmPZVS@[217.235.187.220]) by fwd29.aul.t-online.de with esmtp id 1JEWzZ-0XW2am0; Mon, 14 Jan 2008 22:37:13 +0100 Message-ID: <478BD609.1040307@t-online.de> Date: Mon, 14 Jan 2008 22:37:13 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: The development of GRUB 2 References: <4735CDA9.4060501@t-online.de> <87fxx1hatm.fsf@xs4all.nl> In-Reply-To: <87fxx1hatm.fsf@xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: rCh6E2ZJghOHHAeXPjUvFGk21oFTU+-Se9YGD30RBHZEiNf3rm1-sd1zgRAmqmPZVS X-TOI-MSGID: 1f75149b-7fca-48f2-906c-d4ab2706ea69 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] Use getopt_long() instead of argp_parse() in grub-emu 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: Mon, 14 Jan 2008 21:37:28 -0000 Marco Gerards wrote: > Christian Franke <...> writes: > > >> Unlike the other GRUB2 utils, grub-emu uses the glibc extension >> argp_parse(). It is unavailable on Cygwin, which might also be the >> case for other platforms where glibc is not the native runtime. >> >> This patch changes this back to the more traditional getopt_long(). >> >> It also fixes the syntax of the path prefix. >> > > There where no objections, so I'll review this patch as promised. > > Thanks. > How did you change the path syntax? > > grub_util_get_grub_dev () returns e.g. "hd0,1", the resulting prefix is "hd0,1/boot/grub" but should be "(hd0,1)/boot/grub". >> 2007-11-10 Christian Franke >> >> * util/grub-emu.c: Replace argp.h by getopt.h. >> > > Please use and to show where it comes from. > > >> (parse_opt): Remove. >> > > You also modified options, removed struct arguments, argp and perhaps > other things I missed. You should document them properly in the > changelog entry. > > OK. Christian 2008-01-14 Christian Franke * util/grub-emu.c: Replace by . (argp_program_version): Remove variable. (argp_program_bug_address): Likewise. (options): Convert from struct argp_option to struct option. (struct arguments): Remove. (parse_opt): Remove. (usage): New function. (main): Replace struct args members by simple variables. Replace argp_parse() by getopt_long(). Add switch to evaluate options. Add missing "(...)" around root_dev in prefix string.