grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] fix for partmap detection on RAID/LVM


From: Robert Millan
Subject: Re: [PATCH] fix for partmap detection on RAID/LVM
Date: Fri, 8 Feb 2008 20:38:56 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Fri, Feb 08, 2008 at 07:20:31PM +0000, Sam Morris wrote:
> On Fri, 2008-02-08 at 15:52 +0100, Robert Millan wrote:
> > New patch to fix partmap detection in LVM/RAID.  Changes in comparison to
> > previous patch:
> 
>         (gdb) run -t partmap /boot/grub/
>         Starting program: /home/sam/grub/grub2/grub-probe -t partmap 
> /boot/grub/
>         
>         Program received signal SIGSEGV, Segmentation fault.
>         0x0806035a in grub_raid_scan_device (name=0x806b080 "hd3,2") at 
> disk/raid.c:442
>         442         if (array->device[sb.this_disk.number]->name != 0)

I didn't touch this function.  I assume this was introduced with my previous
commit that redefined this structure.

.name used to be initialized altogether with .disk, so checking for .name
initialization amounts to checking for .disk initialization, which is what
we still have (but with a different name)).

So:

diff -x configure -x config.h.in -x CVS -x '*~' -x '*.mk' -urp -N 
../grub2/disk/raid.c ./disk/raid.c
--- ../grub2/disk/raid.c        2008-02-08 13:35:05.000000000 +0100
+++ ./disk/raid.c       2008-02-08 20:36:47.000000000 +0100
@@ -419,7 +419,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] != NULL)
        {
          /* We found multiple devices with the same number. Again,
             this shouldn't happen.*/

does this work?

-- 
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 via email to

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