From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JPNSW-0008Qb-6A for mharc-grub-devel@gnu.org; Wed, 13 Feb 2008 14:39:56 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JPNSU-0008OU-3y for grub-devel@gnu.org; Wed, 13 Feb 2008 14:39:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JPNSS-0008M4-IO for grub-devel@gnu.org; Wed, 13 Feb 2008 14:39:53 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPNSS-0008Ls-5Q for grub-devel@gnu.org; Wed, 13 Feb 2008 14:39:52 -0500 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JPNSR-0003mG-Q0 for grub-devel@gnu.org; Wed, 13 Feb 2008 14:39:51 -0500 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JPNQd-0006hd-So for grub-devel@gnu.org; Wed, 13 Feb 2008 20:38:02 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1JPNOI-0007VV-UP for grub-devel@gnu.org; Wed, 13 Feb 2008 20:35:34 +0100 Date: Wed, 13 Feb 2008 20:35:34 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080213193534.GA28711@thorin> References: <47B19C57.9020902@leat.rub.de> <20080213154224.GB30040@thorin> <47B32029.200@leat.rub.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <47B32029.200@leat.rub.de> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] Add option to grub-probe to accept system devices as arguments 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: Wed, 13 Feb 2008 19:39:54 -0000 On Wed, Feb 13, 2008 at 05:51:53PM +0100, Fabian Greffrath wrote: > Robert Millan schrieb: > >I find that too unreliable. How do you reproduce current behaviour with > >the command "grub-probe -t fs /dev/sda1" ? > > I don't see the problem. Why should this be unreliable? > > If the device does not exist, grub-probe will throw a "cannot stat > /dev/sda1" error with and without the patch. If the device does exist, > grub-probe will throw a "cannot find device for /dev/sda1" error without > the patch and will return "ext2" with the patch applied. > > See the following examples (I have /dev/hda1, but not /dev/sda1): > > Patched grub-probe: > # grub-probe -t fs /dev/sda1 > grub-probe: error: cannot stat /dev/sda1. > # grub-probe -t fs /dev/hda1 > ext2 > > Current grub-probe: > # grub-probe -t fs /dev/sda1 > grub-probe: error: Cannot stat `/dev/sda1' > # grub-probe -t fs /dev/hda1 > grub-probe: error: cannot find a device for /dev/hda1. The last one sounds like a bug. > >I'd prefer exposed user options than hidden behaviour like this one. > > I still don't see the problem. The program will behave absolutely > predictable: If the argument is a block device it will print the device's > file system. If the argument is a valid path, it will prints the > corresponding device's file system. If the argument is none of both, it > will throw an error. Yes, but does the user know that? Which interface is easier to figure out for the user, one in which different actions require different parameters, or one where the same parameters act in completely different way depending on the file? -- Robert Millan I know my rights; I want my phone call! What use is a phone call… if you are unable to speak? (as seen on /.)