grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Fabian Greffrath
Subject: Re: [PATCH] Add option to grub-probe to accept system devices as arguments
Date: Mon, 11 Feb 2008 16:48:26 +0100
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]