From: Sam Morris <sam@robots.org.uk>
To: grub-devel@gnu.org
Subject: Re: [PATCH] fix for partmap detection on RAID/LVM
Date: Fri, 8 Feb 2008 21:38:25 +0000 (UTC) [thread overview]
Message-ID: <pan.2008.02.08.21.38.26@robots.org.uk> (raw)
In-Reply-To: 20080208193856.GD24599@thorin
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
next prev parent reply other threads:[~2008-02-08 21:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-06 21:18 [PATCH] fix for partmap detection on RAID/LVM Robert Millan
2008-02-06 23:14 ` Robert Millan
2008-02-08 14:52 ` Robert Millan
2008-02-08 19:20 ` Sam Morris
2008-02-08 19:38 ` Robert Millan
2008-02-08 21:38 ` Sam Morris [this message]
2008-02-08 22:39 ` Robert Millan
2008-02-09 10:39 ` Robert Millan
2008-02-09 10:48 ` Robert Millan
[not found] ` <1202733801.24963.11.camel@peder.flower>
2008-02-11 14:05 ` 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=pan.2008.02.08.21.38.26@robots.org.uk \
--to=sam@robots.org.uk \
--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.