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: Sam Morris
Subject: Re: [PATCH] fix for partmap detection on RAID/LVM
Date: Fri, 8 Feb 2008 21:38:25 +0000 (UTC)
User-agent: Pan/0.132 (Waxed in Black)

On Fri, 08 Feb 2008 20:38:56 +0100, Robert Millan wrote:

> 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?

Looks like it!

$ sudo ./grub-probe -t partmap /boot/grub/
pc
pc

-- 
Sam Morris
http://robots.org.uk/
 
PGP key id 1024D/5EA01078
3412 EA18 1277 354B 991B  C869 B219 7FDB 5EA0 1078





reply via email to

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