From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VpIH9-0003uW-Cu for mharc-grub-devel@gnu.org; Sat, 07 Dec 2013 08:50:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpIGz-0003YI-1m for grub-devel@gnu.org; Sat, 07 Dec 2013 08:50:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VpIGq-0001xm-Jy for grub-devel@gnu.org; Sat, 07 Dec 2013 08:50:20 -0500 Received: from mail-ea0-x22c.google.com ([2a00:1450:4013:c01::22c]:41148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpIGq-0001xZ-DP for grub-devel@gnu.org; Sat, 07 Dec 2013 08:50:12 -0500 Received: by mail-ea0-f172.google.com with SMTP id q10so761726ead.31 for ; Sat, 07 Dec 2013 05:50:11 -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=KIZIGKY5xLXKcfKN/lY/hCkQD+uv3Vyuj+G9BjVxtqA=; b=T3OAT242Is9xHd87Tnoh+n0A+l9Jmgr43oP42V/HCU+QWwtIkvpy/BM08Guuhn1tuT gQn6gP4SNbERV+VzWj4Yn9rIGNeBQ7+opwfK2qfEkPlBpikXSZXKDizLwdSHMB5WgNHU IHwkZ+gdc20eGVtgQF2DOjPFklebCtgpWtDnt6cT3Nw+lWJ8gSDlTeQ5oHnIuaz+mIG2 SjHEmu9hRA7Z2V7DyAysmw3GkyZS5+hiWbrwQpT8fmlQHRPyfv5KAr3/pnQ3Wsh4oCpz p9cPvBhODzY+atNen06/1WR+kGG9NCC+DteVLZtBOSlRlYIFNKxHIzQAUf0gj5l3vmRj RMkQ== X-Received: by 10.15.23.206 with SMTP id h54mr6380756eeu.17.1386424211551; Sat, 07 Dec 2013 05:50:11 -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 g47sm6632746eeo.19.2013.12.07.05.50.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 07 Dec 2013 05:50:10 -0800 (PST) Message-ID: <52A32791.7020008@gmail.com> Date: Sat, 07 Dec 2013 14:50:09 +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 2/2 v2] second attempt to fix using grub device name as install device References: <52A2EDA1.7020303@gmail.com> <1386411585-31020-1-git-send-email-arvidjaar@gmail.com> In-Reply-To: <1386411585-31020-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="----enig2CKGKDPJQNEIPRFGVFXHV" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22c 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 13:50:29 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2CKGKDPJQNEIPRFGVFXHV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07.12.2013 11:19, Andrey Borzenkov wrote: > grub-install already resolved passed install device to grub device. So = do the > same as grub-setup and strip parenthesis if we get legacy (hdX). >=20 Did you test it with both syntaxes? > --- > ChangeLog | 4 ++-- > util/grub-install.c | 8 +++++++- > 2 files changed, 9 insertions(+), 3 deletions(-) >=20 > diff --git a/ChangeLog b/ChangeLog > index b93db5e..161c568 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,7 +1,7 @@ > 2013-11-29 Andrey Borzenkov > =20 > - Revert commit 69ca97c820, it cause failures in using OS device name > - in grub-install. > + Revert commit 69ca97c820, it caused failures when using OS device nam= e > + in grub-install. Instead just strip off parenthesis in grub-install = if (hdX) was passed. > =20 > 2013-12-06 Vladimir Serbinenko > =20 > diff --git a/util/grub-install.c b/util/grub-install.c > index 7a1db42..0a9790a 100644 > --- a/util/grub-install.c > +++ b/util/grub-install.c > @@ -1098,7 +1098,13 @@ main (int argc, char *argv[]) > { > if (install_device[0] =3D=3D '(' > && install_device[grub_strlen (install_device) - 1] =3D=3D ')') > - install_drive =3D xstrdup (install_device); > + { > + =20 > + size_t len =3D grub_strlen (install_device) - 2; > + install_drive =3D xmalloc (len + 1); > + memcpy (install_drive, install_device + 1, len); > + install_drive[len] =3D '\0'; > + } > else > { > grub_util_pull_device (install_device); >=20 ------enig2CKGKDPJQNEIPRFGVFXHV 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/ iF4EAREKAAYFAlKjJ5EACgkQmBXlbbo5nOuPWwD/SksEyhgKPn1bBrnh5KePio68 WK/kioz+A0lETQ6x10EBAI51QQlq0uZw2eYGACAUoYIfA7XtGyAreL52yfhWBuQa =ldSR -----END PGP SIGNATURE----- ------enig2CKGKDPJQNEIPRFGVFXHV--