Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-03-04 Thread Fabian Greffrath
Robert Millan schrieb: For 10_linux it isn't that important since the boot parameters are so small, it's 10_hurd that has more reusable stuff (that big blurb). This is true. Furthermore I still haven't found out how to get variables like "host-port", "device-port", "task-create", etc.. In t

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-03-03 Thread Robert Millan
On Fri, Feb 29, 2008 at 09:33:13AM +0100, Fabian Greffrath wrote: > >For this one, I think it'd be much better to rework 10_hurd so that code is > >shared, rather than duplicating the whole blurb. > > Yes, we could source out the complete linux/hurd kernel-adding blurbs > into an external shell l

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-03-03 Thread Robert Millan
On Fri, Feb 29, 2008 at 02:46:17PM +0100, Fabian Greffrath wrote: > Robert Millan schrieb: > >Better do this like it's done in other scripts (check grub-install). Not > >sure > >why, I guess it's more portable that way... > > Ah, now I know what you ment. However, I cannot really see the > adva

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-29 Thread Fabian Greffrath
Robert Millan schrieb: Better do this like it's done in other scripts (check grub-install). Not sure why, I guess it's more portable that way... Ah, now I know what you ment. However, I cannot really see the advantage in grub_probe=${sbindir}/`echo grub-probe | sed ${transform}` with ${tr

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-29 Thread Fabian Greffrath
Robert Millan schrieb: Better do this like it's done in other scripts (check grub-install). Not sure why, I guess it's more portable that way... You mean if [ "x$(FOO)" = "x" ] ... ? For this one, I think it'd be much better to rework 10_hurd so that code is shared, rather than duplicating

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-28 Thread Robert Millan
On Thu, Feb 28, 2008 at 12:46:37PM +0100, Fabian Greffrath wrote: > > if [ -x "`which os-prober 2>/dev/null`" ] ; then Better do this like it's done in other scripts (check grub-install). Not sure why, I guess it's more portable that way... > if [ -x "`which linux-boot-prober 2>/dev/n

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-28 Thread Fabian Greffrath
Robert Millan schrieb: Ok. Is there any mail for that waiting for input? I lose track of things. No problem, please find the script attached. #! /bin/sh -e # update-grub helper script. # Copyright (C) 2006,2007,2008 Free Software Foundation, Inc. # # GRUB is free software: you can redist

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-28 Thread Robert Millan
On Thu, Feb 28, 2008 at 11:28:13AM +0100, Fabian Greffrath wrote: > Robert Millan schrieb: > >Committed. > > Great, thanks! > > Now let's get support for os-prober output parsing. Ok. Is there any mail for that waiting for input? I lose track of things. -- Robert Millan I know my rights; I

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-28 Thread Fabian Greffrath
Robert Millan schrieb: Committed. Great, thanks! Now let's get support for os-prober output parsing. -- Dipl.-Phys. Fabian Greffrath Ruhr-Universität Bochum Lehrstuhl für Energieanlagen und Energieprozesstechnik (LEAT) Universitätsstr. 150, IB 3/134 D-44780 Bochum Telefon: +49 (0)234 / 32-

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-28 Thread Robert Millan
On Thu, Feb 28, 2008 at 08:26:49AM +0100, Fabian Greffrath wrote: > Robert Millan schrieb: > >Ok. Does anybody object to Fabian's patch? I'd like to commit it. > > Silence is consense. ;) Committed. -- Robert Millan I know my rights; I want my phone call! What use is a phone call… if you a

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-28 Thread Fabian Greffrath
Robert Millan schrieb: Ok. Does anybody object to Fabian's patch? I'd like to commit it. Silence is consense. ;) -- Dipl.-Phys. Fabian Greffrath Ruhr-Universität Bochum Lehrstuhl für Energieanlagen und Energieprozesstechnik (LEAT) Universitätsstr. 150, IB 3/134 D-44780 Bochum Telefon: +49

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-25 Thread Robert Millan
On Mon, Feb 25, 2008 at 10:49:01AM +0100, Fabian Greffrath wrote: > >If you fix those, include a ChangeLog entry and noone else objects, I'll > >commit > >it. Feel free to ping me with a direct mail if I stale for too long. > > You are CCed. ;) > > Robert Millan schrieb: > > Is this solved now?

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-25 Thread Fabian Greffrath
Hello! Robert Millan schrieb: It looks good to me. Just a pair of minor details (simply for consistency with code style in grub): [...] done. If you fix those, include a ChangeLog entry and noone else objects, I'll commit it. Feel free to ping me with a direct mail if I stale for too long.

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-24 Thread Robert Millan
On Fri, Feb 22, 2008 at 03:32:02PM +0100, Fabian Greffrath wrote: > However, grub-probe crashes with a double free error message if run with > the -d option. I am somehow stuck in this situation, can you please help me? Is this solved now? If not, you could send a gdb backtrace to give us an id

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-24 Thread Robert Millan
Sorry for the long delay, I've been very busy (and unfortunately I'll continue to be :-(). On Fri, Feb 22, 2008 at 04:36:35PM +0100, Fabian Greffrath wrote: > Well, the solution seems to be easier than I expected. Is the attached > patch acceptable? It looks good to me. Just a pair of minor de

Re: [NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-22 Thread Fabian Greffrath
Well, the solution seems to be easier than I expected. Is the attached patch acceptable? Have a nice weekend, Fabian -- Dipl.-Phys. Fabian Greffrath Ruhr-Universität Bochum Lehrstuhl für Energieanlagen und Energieprozesstechnik (LEAT) Universitätsstr. 150, IB 3/134 D-44780 Bochum Telefon: +49

[NEW PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-22 Thread Fabian Greffrath
Hi Robert, I have created another patch which introduces some of your suggestions, e.g. probe() is called with two arguments and grub_util_check_block_device() does not strdup() the returned string. However, grub-probe crashes with a double free error message if run with the -d option. I am s

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-20 Thread Fabian Greffrath
Now that the FSF has received my copyright assignment paper back, I'd like to become productive on this issue again. From what we've discussed so far I assume that you prefer - the introduction of a new command line option - passing two parameters to probe(), a path and a device, of which one is

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-18 Thread Fabian Greffrath
Robert Millan schrieb: I mean that it should find the disk that contains /dev/hda1 device _node_. Maybe, but I do not believe this has anything to do with my patch. Is the same output supposed to be printed in all "???" ? If not, what is in each one? In all of these cases the 'if (S_ISBLK

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-17 Thread Robert Millan
On Thu, Feb 14, 2008 at 09:33:48AM +0100, Fabian Greffrath wrote: > Robert Millan schrieb: > >The last one sounds like a bug. > > Yes, it's from the current *unpatched* grub-probe. I mean that it should find the disk that contains /dev/hda1 device _node_. > >Which interface is easier to figure o

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-14 Thread Fabian Greffrath
Robert Millan schrieb: The last one sounds like a bug. Yes, it's from the current *unpatched* grub-probe. Yes, but does the user know that? We could tell the user via 'grub-probe --help' that he may pass either a path or a block device as an argument. Which interface is easier to figure

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-13 Thread Robert Millan
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 n

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-13 Thread Fabian Greffrath
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 witho

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-13 Thread Robert Millan
On Tue, Feb 12, 2008 at 02:17:11PM +0100, Fabian Greffrath wrote: > Please have a look at the patch I provided in my last mail, too. This is a > different approach which requires no further command line option but > *detects* whether the given argument is a path or a device. I find that too unre

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-13 Thread Fabian Greffrath
Fabian Greffrath schrieb: Please have a look at the patch I provided in my last mail, too. This is a different approach which requires no further command line option but *detects* whether the given argument is a path or a device. Ping! ;-) ___ Grub

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-12 Thread Fabian Greffrath
Please have a look at the patch I provided in my last mail, too. This is a different approach which requires no further command line option but *detects* whether the given argument is a path or a device. ___ Grub-devel mailing list Grub-devel@gnu.org

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-12 Thread Robert Millan
On Tue, Feb 12, 2008 at 10:49:37AM +0100, Fabian Greffrath wrote: > >You put that function in a separate file, which indicates it is meant to be > >a general-purpose function, but its spec is constrained by the code in > >grub-probe (i.e. you strdup() not because it is needed for the purpose of > >

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-12 Thread Fabian Greffrath
You put that function in a separate file, which indicates it is meant to be a general-purpose function, but its spec is constrained by the code in grub-probe (i.e. you strdup() not because it is needed for the purpose of this function, but because grub-probe already calls free()). That's right.

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-11 Thread Robert Millan
On Mon, Feb 11, 2008 at 04:48:26PM +0100, Fabian Greffrath wrote: > >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). You put that function in a separate file, which indicates it is

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-11 Thread Fabian Greffrath
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 `

Re: [PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-11 Thread Robert Millan
On Mon, Feb 11, 2008 at 09:53:15AM +0100, Fabian Greffrath wrote: > The following patch adds to grub-probe the ability to accept system devices > as > arguments and e.g. convert between system devices and GRUB drives. > > This patch is improved over the one from my previous posting and has some

[PATCH] Add option to grub-probe to accept system devices as arguments

2008-02-11 Thread Fabian Greffrath
The following patch adds to grub-probe the ability to accept system devices as arguments and e.g. convert between system devices and GRUB drives. This patch is improved over the one from my previous posting and has some minor issues fixed. Please use this version instead. It is all my work. ï