All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] simplify grub_raid_array
Date: Wed, 6 Feb 2008 23:59:54 +0100	[thread overview]
Message-ID: <20080206225954.GA17090@thorin> (raw)
In-Reply-To: <87bq6thfj8.wl@dekkers.cx>

On Wed, Feb 06, 2008 at 11:43:39PM +0100, Jeroen Dekkers wrote:
> At Wed, 6 Feb 2008 17:45:07 +0100,
> Robert Millan wrote:
> > Unless I missed something, it seems that grub_raid_array contains redundant
> > information (`name' is already present via `disk->name').  I propose to
> > simplify it this way.
> 
> No idea why, I don't have the time to look at the actual code, but 
>  
> > @@ -410,7 +410,7 @@ grub_raid_scan_device (const char *name)
> >  	  return 0;
> >  	}
> >    
> > -      if (array->device[sb.this_disk.number].name != 0)
> > +      if (array->device[sb.this_disk.number]->name != 0)
> >  	{
> >  	  /* We found multiple devices with the same number. Again,
> >  	     this shouldn't happen.*/
> 
> looks suspicious to me. Is that really doing what it is meant to do?

Yes.  `array->device[sb.this_disk.number]' used to be:

  struct { char *name; grub_disk_t disk; }

and it becomes grub_disk_t, which is:

  struct { char *name; other stuff; } *

this is tested in runtime.  My concern was more about whether both `name'
instances could have different meaning or so.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)



  reply	other threads:[~2008-02-06 23:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-06 16:45 [PATCH] simplify grub_raid_array Robert Millan
2008-02-06 22:43 ` Jeroen Dekkers
2008-02-06 22:59   ` Robert Millan [this message]
2008-02-08 22:56     ` Jeroen Dekkers
2008-02-08 23:09       ` Robert Millan
2008-02-08 12:31 ` 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=20080206225954.GA17090@thorin \
    --to=rmh@aybabtu.com \
    --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.