[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] simplify grub_raid_array
From: |
Robert Millan |
Subject: |
Re: [PATCH] simplify grub_raid_array |
Date: |
Wed, 6 Feb 2008 23:59:54 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
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 /.)