From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1IqbAH-0006Dt-0h for mharc-grub-devel@gnu.org; Fri, 09 Nov 2007 16:13:21 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IqbAF-0006BC-8F for grub-devel@gnu.org; Fri, 09 Nov 2007 16:13:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IqbAD-0006AK-SF for grub-devel@gnu.org; Fri, 09 Nov 2007 16:13:18 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IqbAD-0006AH-L7 for grub-devel@gnu.org; Fri, 09 Nov 2007 16:13:17 -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 1IqbAD-0002GJ-Cy for grub-devel@gnu.org; Fri, 09 Nov 2007 16:13:17 -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 1IqbAB-0002UO-Ts for grub-devel@gnu.org; Fri, 09 Nov 2007 22:13:16 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1Iqb9y-0007tu-Ji for grub-devel@gnu.org; Fri, 09 Nov 2007 22:13:02 +0100 Date: Fri, 9 Nov 2007 22:13:02 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20071109211302.GC23437@thorin> References: <47264070.7060007@t-online.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47264070.7060007@t-online.de> Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. 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] grub-probe -t prefix, -t all 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: Fri, 09 Nov 2007 21:13:20 -0000 On Mon, Oct 29, 2007 at 09:20:00PM +0100, Christian Franke wrote: > This patch adds '-t prefix', '-t all', and allows multiple -t options to > be specified. > > '-t prefix' was initially added to test grub_get_prefix() on Cygwin, but > may be useful in scripts. What does -t prefix do? Is it the same as make_system_path_relative_to_its_root () ? Sounds like I screwed up then :-/ > +#define PRINT_FS 0x01 > +#define PRINT_DRIVE 0x02 > +#define PRINT_PREFIX 0x04 > +#define PRINT_DEVICE 0x08 > +#define PRINT_PARTMAP 0x10 In general, GRUB bitmasks are declared as (1 << 0), (1 << 1), etc. It'd be nice to keep this consistent. > drive_name = grub_util_get_grub_dev (device_name); > if (! drive_name) > grub_util_error ("cannot find a GRUB drive for %s.\n", device_name); This check (and possibly others) is an abort condition. Before your change, if we reached this point we knew we wanted to abort, but this may not be true anymore. Did you check this? > + -t, --target=(fs|drive|prefix|device|partmap|all)\n\ > + print filesystem module, GRUB drive, path prefix, system device\n\ > + or partition map module [default=fs]\n\ Uhm what's the purpose of `-t all' ? grub-probe is only intended to be called by scripts. -- 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 /.)