From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1S5fwY-0000cj-KX for mharc-grub-devel@gnu.org; Thu, 08 Mar 2012 11:11:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5fwN-0000aP-I2 for grub-devel@gnu.org; Thu, 08 Mar 2012 11:11:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5fwF-0000KE-Pk for grub-devel@gnu.org; Thu, 08 Mar 2012 11:11:43 -0500 Received: from wp191.webpack.hosteurope.de ([80.237.132.198]:33473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5fwF-0000JK-Ej for grub-devel@gnu.org; Thu, 08 Mar 2012 11:11:35 -0500 Received: from p4fc26eb5.dip.t-dialin.net ([79.194.110.181] helo=neptun.omega.ssw.de); authenticated by wp191.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1S5fwD-0005ux-8b; Thu, 08 Mar 2012 17:11:33 +0100 Received: from localhost (localhost [127.0.0.1]) by neptun.omega.ssw.de (Postfix) with ESMTP id 8B2AEE180A8; Thu, 8 Mar 2012 17:11:32 +0100 (CET) X-Virus-Scanned: amavisd-new at omega.ssw.de Received: from neptun.omega.ssw.de ([127.0.0.1]) by localhost (neptun.omega.ssw.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H0QiFCZIiI-p; Thu, 8 Mar 2012 17:11:20 +0100 (CET) Received: from [192.168.2.43] (p640.fritz.box [192.168.2.43]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by neptun.omega.ssw.de (Postfix) with ESMTP id 3AE94E180A7; Thu, 8 Mar 2012 17:11:20 +0100 (CET) Message-ID: <4F58DA30.7050007@anvo-it.de> Date: Thu, 08 Mar 2012 17:11:28 +0100 From: Andreas Vogel User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [BUG] GRUBs option parsing needs fixing References: <4F541349.7070704@anvo-it.de> <4F541723.6030105@gmail.com> <4F54A094.1000000@anvo-it.de> <4F54B78B.9010707@gmail.com> <4F54DF19.7000804@anvo-it.de> <4F58B03E.2050908@anvo-it.de> <4F58BEE8.3050006@gmail.com> <4F58C2E7.6080000@gmail.com> <4F58CA35.2060506@anvo-it.de> <4F58CDAD.3010300@gmail.com> <20120308152804.GR14853@caffeine.csclub.uwaterloo.ca> <4F58D23A.5020508@gmail.com> In-Reply-To: <4F58D23A.5020508@gmail.com> X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-bounce-key: webpack.hosteurope.de; andreas.vogel@anvo-it.de; 1331223095; 1337648c; X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.237.132.198 Cc: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 16:11:53 -0000 Am 08.03.2012 16:37, schrieb Vladimir '=CF=86-coder/phcoder' Serbinenko: > On 08.03.2012 16:28, Lennart Sorensen wrote: >> On Thu, Mar 08, 2012 at 04:18:05PM +0100, Vladimir '=CF=86-coder/phcod= er' >> Serbinenko wrote: >>> We don't have to recreate whole GNU in GRUB either, we don't write >>> an OS but a bootloader. In particular having -xfoo for isn't >>> necessarry and moreover it will conflict with >>> search -su >> So a 'short' option that looks like a 'long' option? >> >> Or is that -s and -u together? > It's -s and -u together and so -s has no argument. With Andreas > proposition "u" would be the argument Btw, that's the POSIX/GNU proposition. ;) >> Options can get confusing at times? >> >>> which is already used in the wild. >>> The case of --long-option optional argument can be changed >>> especially taking into account migration from 1.98 but -xfoo is >>> probably out of the question. >> I don't see how -xfoo where foo is a parameter for -x can work if you >> support multiple short options being merged (which seems common in >> GNU programs). > You can if when encountering an option needing parameter you parse the > rest as parameter. But then again optional parameter are tricky. > Behaviour similar to other GNU is important but compatibility with > previous version of GRUB is more so, especially when it comes to the > rarely used features like -xfoo.=20 That's the big misinterpretation done in the past: without being able to handle "-xfoo" you'll not be able to handle optional arguments in a proper way. So it's nothing about using a rarely used feature. The guys writing the POSIX/GNU recommendation did a great job and they knew exactly what they proposed and for what reasons.