From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VpFW5-0008EB-KC for mharc-grub-devel@gnu.org; Sat, 07 Dec 2013 05:53:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpFVv-0008E2-VH for grub-devel@gnu.org; Sat, 07 Dec 2013 05:53:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VpFVl-00058L-MI for grub-devel@gnu.org; Sat, 07 Dec 2013 05:53:35 -0500 Received: from mail-ee0-x229.google.com ([2a00:1450:4013:c00::229]:52950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpFVl-00058H-FX for grub-devel@gnu.org; Sat, 07 Dec 2013 05:53:25 -0500 Received: by mail-ee0-f41.google.com with SMTP id t10so712998eei.14 for ; Sat, 07 Dec 2013 02:53:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=IEEd/giuzxPZgtJVrGHb7qmNwOc/JkTwS3blq4OsNyA=; b=hufIPt9DwT755jfSmtcNZG69v6mjYhcfazCVZ+9W4sdHJZ+OolaVpMUiBTRmXHtMQp 2EYd3T2Hj3gVASbKQLssX/BFHDCaV3jyNXpCVCrBQNpaCEVisO9tEEgsbG8FMkqENaVd bZ9IOx8JKo+mKD6aK1YVyTyoP01SXkD51E7G2Xqa3JkSu3dx1kDnPVBBZ0LZDnIV7V52 j5YWQmzSvXYzQGHTPHnqpnyI6FIW8HYJX/EI+EyXIAo8Dk6cqBPnL2jyessMO34bR0mo mLP88FYia+evx9O6auWPqodLFyo3xM7YKWyFmzxZQtUFpwjJb+/oxsJ49Miwvkgg2qCz kzdA== X-Received: by 10.14.108.6 with SMTP id p6mr5816765eeg.31.1386413604572; Sat, 07 Dec 2013 02:53:24 -0800 (PST) Received: from [192.168.1.16] (85-188.196-178.cust.bluewin.ch. [178.196.188.85]) by mx.google.com with ESMTPSA id e3sm5231062eeg.11.2013.12.07.02.53.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 07 Dec 2013 02:53:23 -0800 (PST) Message-ID: <52A2FE1A.6070502@gmail.com> Date: Sat, 07 Dec 2013 11:53:14 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] fix partition module names when /boot is on diskfilter References: <1386413161-15520-1-git-send-email-arvidjaar@gmail.com> In-Reply-To: <1386413161-15520-1-git-send-email-arvidjaar@gmail.com> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2EUKDQGLEGUWMHXLHMMWW" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::229 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: Sat, 07 Dec 2013 10:53:44 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2EUKDQGLEGUWMHXLHMMWW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Go ahead. On 07.12.2013 11:46, Andrey Borzenkov wrote: > /usr/local/grub2/sbin/grub-install: info: grub-mkimage --directory '/us= r/local/grub2/lib/grub/i386-pc' --prefix '(mduuid/e6d1dcf06cea72140bafae7= 4a8677f36)/grub' --output '/boot/grub/i386-pc/core.img' --format 'i386-pc= ' --compression 'auto' 'ext2' 'msdos' 'msdos' 'diskfilter' 'mdraid1x' 'b= iosdisk' > . > /usr/local/grub2/sbin/grub-install: error: cannot open `/usr/local/grub= 2/lib/grub/i386-pc/msdos.mod': No such file or directory. >=20 > Introduce common helper for both diskfilter and non-diskfilter case tha= t > converts partition map names into module names. >=20 > --- > util/grub-install.c | 29 +++++++++++++++++------------ > 1 file changed, 17 insertions(+), 12 deletions(-) >=20 > diff --git a/util/grub-install.c b/util/grub-install.c > index e0d942f..4cc557e 100644 > --- a/util/grub-install.c > +++ b/util/grub-install.c > @@ -323,6 +323,21 @@ probe_raid_level (grub_disk_t disk) > } > =20 > static void > +push_partmap_module (const char *map) > +{ > + char buf[50]; > + > + if (strcmp (map, "openbsd") =3D=3D 0 || strcmp (map, "netbsd") =3D=3D= 0) > + { > + grub_install_push_module ("part_bsd"); > + return; > + } > + > + snprintf (buf, sizeof (buf), "part_%s", map); > + grub_install_push_module (buf); > +} > + > +static void > probe_mods (grub_disk_t disk) > { > grub_partition_t part; > @@ -333,21 +348,11 @@ probe_mods (grub_disk_t disk) > grub_util_info ("no partition map found for %s", disk->name); > =20 > for (part =3D disk->partition; part; part =3D part->parent) > - { > - char buf[50]; > - if (strcmp (part->partmap->name, "openbsd") =3D=3D 0 > - || strcmp (part->partmap->name, "netbsd") =3D=3D 0) > - { > - grub_install_push_module ("part_bsd"); > - continue; > - } > - snprintf (buf, sizeof (buf), "part_%s", part->partmap->name); > - grub_install_push_module (buf); > - } > + push_partmap_module (part->partmap->name); > =20 > if (disk->dev->id =3D=3D GRUB_DISK_DEVICE_DISKFILTER_ID) > { > - grub_diskfilter_get_partmap (disk, grub_install_push_module); > + grub_diskfilter_get_partmap (disk, push_partmap_module); > have_abstractions =3D 1; > } > =20 >=20 ------enig2EUKDQGLEGUWMHXLHMMWW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlKi/iIACgkQmBXlbbo5nOsAsQD8CflpwrVyYtW+/757hcTywsRV X8EUMklOdIINjvm9Si4BAIL593v417qzzPGK/AulBD3gs3/8Nyxj7i71ZAiNfpA6 =UPKK -----END PGP SIGNATURE----- ------enig2EUKDQGLEGUWMHXLHMMWW--