From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JOat6-0000yh-MW for mharc-grub-devel@gnu.org; Mon, 11 Feb 2008 10:48:08 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOat5-0000yC-5X for grub-devel@gnu.org; Mon, 11 Feb 2008 10:48:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOat3-0000xW-IC for grub-devel@gnu.org; Mon, 11 Feb 2008 10:48:06 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOat3-0000xS-5w for grub-devel@gnu.org; Mon, 11 Feb 2008 10:48:05 -0500 Received: from mx2.rz.ruhr-uni-bochum.de ([134.147.64.30]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JOat2-0008La-KG for grub-devel@gnu.org; Mon, 11 Feb 2008 10:48:04 -0500 X-Queued: (qmail 15648 invoked by uid 281); 11 Feb 2008 15:48:03 -0000 X-Qmailscanner: from 134.147.252.214 by mx2.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.051218 secs); 11 Feb 2008 15:48:03 -0000 Received: from router.leat.ruhr-uni-bochum.de (134.147.252.214) by mx2.rz.ruhr-uni-bochum.de with SMTP; 11 Feb 2008 15:48:03 -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 m1BFr61l011633 for ; Mon, 11 Feb 2008 16:53:06 +0100 Message-ID: <47B06E4A.9070801@leat.rub.de> Date: Mon, 11 Feb 2008 16:48:26 +0100 From: Fabian Greffrath User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: The development of GRUB 2 References: 20080211143903.GA21126@thorin Content-Type: text/plain; charset=ISO-8859-15; 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: Mon, 11 Feb 2008 15:48:07 -0000 Hi Robert, > You need to list every function or variable separately. [...] > If you use the -p option to diff it'll be easier to check it just by reading the > patch. OK, thanks, I didn't know this. Next time... ;) > Is there really a need to strdup() it? Yep. If you return the pointer (i.e. to `path') you'll get memory corruption as soon as you try to free (device_name). > I find it confusing that you change the meaning of the `path' variable without > renaming it. Also, the variable that describes what `path' is > (argument_is_device) is passed separately. Allright. Maybe the `path' variable should be renamed to `argument'. > What would you think of a scheme where both are passed as strings and either > can be NULL? Well, I prefer the idea to have the argument stored in one string and have a separate boolean switch that tells if the string contains a device name or a path. But I am always open to suggestions. ;) > I suspect advertising it here might lead users to think they can pass a device > to it, without caring about [...] this option. Allright, this should be changed to something like this: "Probe device information for a given path (or device, if the -d option is given)." Thanks! Cheers, Fabian