Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MH3sB-0003G0-NQ for mharc-grub-devel@gnu.org; Wed, 17 Jun 2009 18:44:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MH3s9-0003FF-NF for grub-devel@gnu.org; Wed, 17 Jun 2009 18:44:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MH3s4-0003Eg-Cu for grub-devel@gnu.org; Wed, 17 Jun 2009 18:44:48 -0400 Received: from [199.232.76.173] (port=37234 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MH3s4-0003Ed-4z for grub-devel@gnu.org; Wed, 17 Jun 2009 18:44:44 -0400 Received: from c60.cesmail.net ([216.154.195.49]:31526) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MH3s3-0001lk-Hx for grub-devel@gnu.org; Wed, 17 Jun 2009 18:44:43 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 17 Jun 2009 18:44:41 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id EC77034C6D for ; Wed, 17 Jun 2009 18:50:07 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <1245247706.3497.44.camel@fz.local> References: <1245247706.3497.44.camel@fz.local> Content-Type: text/plain Date: Wed, 17 Jun 2009 18:44:39 -0400 Message-Id: <1245278679.32616.106.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.2 (2.26.2-1.fc11) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] add support for dmraid devices 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: Wed, 17 Jun 2009 22:44:49 -0000 On Wed, 2009-06-17 at 16:08 +0200, Felix Zielcke wrote: > add support for dmraid devices That's good. I have a system with a PDC RAID, and although I only have one drive connected, GRUB2 won't install on it. I'm looking forward to testing your patch on that hardware. Unfortunately, your patch doesn't compile as is. That hanging "12" in grub_util_is_dmraid() is not needed. Also please avoid adding trailing whitespace. STGit warns about it. "hostdisc" should be spelled "hostdisk". What is "cediideh"? Actually, on the system I mentioned, root is mounted on /dev/mapper/pdc_dieaihahp2. If "cediideh" is supposed to represent all weird names 8 characters long, let's use numbers "12345678". Even after fixing the compile error, I'm getting a warning: util/hostdisk.c: In function 'grub_util_biosdisk_get_grub_dev': util/hostdisk.c:916: warning: 'disk' may be used uninitialized in this function util/hostdisk.c:916: note: 'disk' was declared here Your patch removed the code where 'disk' is initialized: disk = grub_disk_open (name); Yet grub_disk_close() is still there. Removing it fixes the warning, but I'd like you to recheck the patch. Apparently the 'disk' variable was used for different purposes throughout the function. While at that, it would be great to avoid variable shadowing too and keep variables in the innermost possible scope. Finally, the test results, apparently negative: [root@mx grub2.git]# mount /dev/mapper/pdc_dieaihahp2 on / type ext4 (rw) /proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/mapper/pdc_dieaihahp1 on /boot type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) debugfs on /sys/kernel/debug type debugfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) [root@mx grub2.git]# grub-install /dev/mapper/pdc_dieaihah --recheck grub-probe: error: Cannot find a GRUB drive for /dev/mapper/pdc_dieaihahp1. Check your device.map. Auto-detection of a filesystem module failed. Please specify the module with the option `--modules' explicitly. [root@mx grub2.git]# cat /boot/grub/device.map (fd0) /dev/fd0 (hd0) /dev/sda [root@mx grub2.git]# I think we need a list of possible dmraid names. There we could go through the list in a loop. That applies to grub_util_is_dmraid() and other places in the code. -- Regards, Pavel Roskin