From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JPKpd-00068Q-TX for mharc-grub-devel@gnu.org; Wed, 13 Feb 2008 11:51:38 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JPKpc-000682-Do for grub-devel@gnu.org; Wed, 13 Feb 2008 11:51:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JPKpX-00067W-U5 for grub-devel@gnu.org; Wed, 13 Feb 2008 11:51:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPKpX-00067T-OH for grub-devel@gnu.org; Wed, 13 Feb 2008 11:51:31 -0500 Received: from mx1.rz.ruhr-uni-bochum.de ([134.147.32.86]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JPKpX-0008PD-8T for grub-devel@gnu.org; Wed, 13 Feb 2008 11:51:31 -0500 X-Queued: (qmail 14744 invoked by uid 281); 13 Feb 2008 16:51:30 -0000 X-Qmailscanner: from 134.147.252.214 by mx1.rz.ruhr-uni-bochum.de (envelope-from , uid 80) with qmail-scanner-2.01 (sophie: 3.05/2.52/4.24. Clear:RC:1(134.147.252.214):. Processed in 0.071687 secs); 13 Feb 2008 16:51:30 -0000 Received: from router.leat.ruhr-uni-bochum.de (134.147.252.214) by mx1.rz.ruhr-uni-bochum.de with SMTP; 13 Feb 2008 16:51:29 -0000 Received: from [134.147.55.45] (frodo.leat.ruhr-uni-bochum.de [134.147.55.45]) by router.leat.ruhr-uni-bochum.de (8.12.2/8.12.2/SuSE Linux 0.6) with ESMTP id m1DGuc1l019625 for ; Wed, 13 Feb 2008 17:56:38 +0100 Message-ID: <47B32029.200@leat.rub.de> Date: Wed, 13 Feb 2008 17:51:53 +0100 From: Fabian Greffrath User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: The development of GRUB 2 References: <47B19C57.9020902@leat.rub.de> <20080213154224.GB30040@thorin> In-Reply-To: <20080213154224.GB30040@thorin> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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 16:51:36 -0000 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. > 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. Cheers, Fabian