All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabian Greffrath <greffrath@leat.rub.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Add option to grub-probe to accept system devices as arguments
Date: Mon, 11 Feb 2008 16:48:26 +0100	[thread overview]
Message-ID: <47B06E4A.9070801@leat.rub.de> (raw)

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	other threads:[~2008-02-11 15:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 15:48 Fabian Greffrath [this message]
2008-02-11 16:12 ` [PATCH] Add option to grub-probe to accept system devices as arguments Robert Millan
  -- strict thread matches above, loose matches on Subject: below --
2008-02-12 13:17 Fabian Greffrath
2008-02-13 13:03 ` Fabian Greffrath
2008-02-13 15:42 ` Robert Millan
2008-02-13 16:51   ` Fabian Greffrath
2008-02-13 19:35     ` Robert Millan
2008-02-14  8:33       ` Fabian Greffrath
2008-02-17 13:42         ` Robert Millan
2008-02-18 12:54           ` Fabian Greffrath
2008-02-20 14:14           ` Fabian Greffrath
2008-02-12  9:49 Fabian Greffrath
2008-02-12 11:28 ` Robert Millan
2008-02-11  8:53 Fabian Greffrath
2008-02-11 14:39 ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47B06E4A.9070801@leat.rub.de \
    --to=greffrath@leat.rub.de \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.