Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QZ1F8-0001qJ-JS for mharc-grub-devel@gnu.org; Tue, 21 Jun 2011 09:43:50 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYvHP-0006x6-4z for grub-devel@gnu.org; Tue, 21 Jun 2011 03:21:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYvHM-0006gh-O2 for grub-devel@gnu.org; Tue, 21 Jun 2011 03:21:46 -0400 Received: from mx4.syscomp.de ([213.23.100.165]:52496 helo=fw1.syscomp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYvHM-0006fd-3h for grub-devel@gnu.org; Tue, 21 Jun 2011 03:21:44 -0400 Received: from auxchangea.syscomp.de (auxchangea.syscomp.de [10.1.4.46]) by fw1.syscomp.de (8.14.3/8.14.3/Debian-5) with ESMTP id p5L7Lbsr029485 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 Jun 2011 09:21:37 +0200 Received: from auedv3.syscomp.de (auedv3.syscomp.de [10.1.32.53]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by auxchangea.syscomp.de (Postfix) with ESMTP id 1D220C84F02; Tue, 21 Jun 2011 09:21:37 +0200 (CEST) Date: Tue, 21 Jun 2011 09:21:27 +0200 From: Florian Wagner To: grub-devel@gnu.org, phcoder@gmail.com Subject: Possible bug in grub2 Message-ID: <20110621092127.5719a884@auedv3.syscomp.de> Organization: Syscomp GmbH X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/LfJLo_X7zX_HEYlFBHLOjvO"; protocol="application/pgp-signature" X-Panda-GateDefender-Performa-Antispam: valid (score=0) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.23.100.165 X-Mailman-Approved-At: Tue, 21 Jun 2011 09:43:49 -0400 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2011 07:21:49 -0000 --Sig_/LfJLo_X7zX_HEYlFBHLOjvO Content-Type: multipart/mixed; boundary="MP_/NZvQDxLGiaVnMv4jYW1t1NL" --MP_/NZvQDxLGiaVnMv4jYW1t1NL Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I'm currently in the process of backporting some changes recently gone into grub2 to an older version for a local package. During that I think I've found a bug. Changeset 3185 contains among other things the following: --- util/grub-setup.c 2011-03-29 00:20:52 +0000 +++ util/grub-setup.c 2011-04-08 11:59:07 +0000 @@ -973,7 +973,15 @@ char **devicelist; int i; =20 - devicelist =3D grub_util_raid_getmembers (dest_dev); + if (arguments.device[0] =3D=3D '/') + devicelist =3D grub_util_raid_getmembers (arguments.device); + else + { + char *devname; + devname =3D xasprintf ("/dev/%s", dest_dev); + devicelist =3D grub_util_raid_getmembers (dest_dev); + free (devname); + } =20 for (i =3D 0; devicelist[i]; i++) { Judging from the changes made to the grub_util_raid_getmembers function in the same changeset it now expects a full path to a device instead of a postfix which it previously prepended with "/dev/". As such it should be called with "devname" instead of "dest_dev" in the else branch above. Untested patch against current trunk is attached. Regards Florian Wagner -------------- Florian Wagner Abteilung EDV Telefon: 0821 / 4201 - 453 Fax: 0821 / 4201 - 411 E-Mail: f_wagner@syscomp.de Syscomp Biochemische Dienstleistungen GmbH August-Wessels-Stra=C3=9Fe 5, 86154 Augsburg Postfach 102506, 86015 Augsburg Telefon: 0821 / 4201 - 0 Fax: 0821 / 417992 Web: http://www.syscomp.de E-Mail: syscomp@syscomp.de Gesch=C3=A4ftsf=C3=BChrerin: Gabriele Schottdorf Registergericht Augsburg HRB 8670 --MP_/NZvQDxLGiaVnMv4jYW1t1NL Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=correct-call-to-grub_util_raid_getmembers.patch =3D=3D=3D modified file 'util/grub-setup.c' --- util/grub-setup.c 2011-04-19 20:39:14 +0000 +++ util/grub-setup.c 2011-06-21 07:16:41 +0000 @@ -977,7 +977,7 @@ { char *devname; devname =3D xasprintf ("/dev/%s", dest_dev); - devicelist =3D grub_util_raid_getmembers (dest_dev); + devicelist =3D grub_util_raid_getmembers (devname); free (devname); } =20 --MP_/NZvQDxLGiaVnMv4jYW1t1NL-- --Sig_/LfJLo_X7zX_HEYlFBHLOjvO Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk4ARncACgkQLvW/2gp2pPxQnwCfVSkraZMLDcuHYb3bb0WzIs6K e4oAmwXCFbpnFmwkWrhaLJ0yxT6jbTQT =m76d -----END PGP SIGNATURE----- --Sig_/LfJLo_X7zX_HEYlFBHLOjvO--