From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JNavm-0002Vz-2Z for mharc-grub-devel@gnu.org; Fri, 08 Feb 2008 16:38:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JNavk-0002Uj-4y for grub-devel@gnu.org; Fri, 08 Feb 2008 16:38:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JNavi-0002Td-Ce for grub-devel@gnu.org; Fri, 08 Feb 2008 16:38:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JNavi-0002TW-3X for grub-devel@gnu.org; Fri, 08 Feb 2008 16:38:42 -0500 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JNavh-0005Yu-PD for grub-devel@gnu.org; Fri, 08 Feb 2008 16:38:42 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JNava-0007wy-Vd for grub-devel@gnu.org; Fri, 08 Feb 2008 21:38:34 +0000 Received: from crypt.ethx.net ([82.165.27.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 08 Feb 2008 21:38:34 +0000 Received: from sam by crypt.ethx.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 08 Feb 2008 21:38:34 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: grub-devel@gnu.org From: Sam Morris Date: Fri, 8 Feb 2008 21:38:25 +0000 (UTC) Message-ID: References: <20080206211840.GA13360@thorin> <20080206231401.GA17655@thorin> <20080208145236.GA19517@thorin> <1202498431.5332.3.camel@xerces> <20080208193856.GD24599@thorin> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: crypt.ethx.net User-Agent: Pan/0.132 (Waxed in Black) Sender: news X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) Subject: Re: [PATCH] fix for partmap detection on RAID/LVM X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 21:38:44 -0000 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