From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1PaQxh-0006Xj-RS for mharc-grub-devel@gnu.org; Wed, 05 Jan 2011 05:51:25 -0500 Received: from [140.186.70.92] (port=36690 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaQxf-0006Xe-NA for grub-devel@gnu.org; Wed, 05 Jan 2011 05:51:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PaQxe-0005hH-JK for grub-devel@gnu.org; Wed, 05 Jan 2011 05:51:23 -0500 Received: from mail-fx0-f41.google.com ([209.85.161.41]:38820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PaQxe-0005hD-Ck for grub-devel@gnu.org; Wed, 05 Jan 2011 05:51:22 -0500 Received: by fxm12 with SMTP id 12so8353290fxm.0 for ; Wed, 05 Jan 2011 02:51:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type; bh=34sUB1rsAdg+TYNoX6oAyNXzBf8kB2n2IvUvuDhi/uo=; b=ow9VA3lI5nx/gjdKaiVuGs2a5XbQlQCsfogsWrGZBT3fK0rtSPPnddiyfJEEHfShzG 3yl/7cMPFxkijYoPBkXxy4cUq0PNC2Qi8GRT/faM11Ak01J/UA63TcC8gwwLt3CaFA9z bqsQUbsmPQWUAgR9IFBeO/IOdr7FgjVU+q93A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; b=tnO/5vlcrmGjB2HPjYsNZ/0vh+4YzbXLouZNdoTkP3JAb51BYwDyN7wTmWqO0Iqjtd grKzmBePEN7encGZhyFLtbDbhmhltx1372vehhxXlBLPJm586JmN0xhAWdUrtWTP447o ARuLU3OcZXNoN//rWEYdzRuJnXAx1f0C6FL2c= Received: by 10.223.118.136 with SMTP id v8mr5918009faq.90.1294224681476; Wed, 05 Jan 2011 02:51:21 -0800 (PST) Received: from debian.bg45.phnet (gprs07.swisscom-mobile.ch [193.247.250.7]) by mx.google.com with ESMTPS id y3sm5418282fai.38.2011.01.05.02.51.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 05 Jan 2011 02:51:20 -0800 (PST) Message-ID: <4D244D13.4060106@gmail.com> Date: Wed, 05 Jan 2011 11:50:59 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 MIME-Version: 1.0 To: The development of GNU GRUB References: <4C818DBC.10002@gmail.com> <4CCF5BFC.1020907@gmail.com> <4CCFD919.7080205@gmail.com> <4CD03517.9000500@gmail.com> In-Reply-To: <4CD03517.9000500@gmail.com> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigD2DA9ED623F3E4FE12AB3A7D" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: =?UTF-8?B?R3LDqWdvaXJlIFN1dHJl?= Subject: [RFT] NetBSD embedding regression fix X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 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: Wed, 05 Jan 2011 10:51:24 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD2DA9ED623F3E4FE12AB3A7D Content-Type: multipart/mixed; boundary="------------040805030806070800030108" This is a multi-part message in MIME format. --------------040805030806070800030108 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Please test the attached patch --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------040805030806070800030108 Content-Type: text/x-diff; name="bsd.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="bsd.diff" =3D=3D=3D modified file 'util/grub-setup.c' --- util/grub-setup.c 2010-11-26 21:03:16 +0000 +++ util/grub-setup.c 2011-01-05 10:48:40 +0000 @@ -49,6 +49,7 @@ #include #include "progname.h" #include +#include =20 #define _GNU_SOURCE 1 #include @@ -339,6 +340,12 @@ { if (p->parent !=3D container) return 0; + /* NetBSD and OpenBSD subpartitions have metadata inside a partiti= on, + so they are safe to ignore. + */ + if (grub_strcmp (p->partmap->name, "netbsd") =3D=3D 0 + || grub_strcmp (p->partmap->name, "openbsd") =3D=3D 0) + return 0; if (dest_partmap =3D=3D NULL) { dest_partmap =3D p->partmap; @@ -352,6 +359,15 @@ =20 grub_partition_iterate (dest_dev->disk, identify_partmap); =20 + if (container && grub_strcmp (container->partmap->name, "msdos") =3D= =3D 0 + && dest_partmap + && (container->msdostype =3D=3D GRUB_PC_PARTITION_TYPE_NETBSD + || container->msdostype =3D=3D GRUB_PC_PARTITION_TYPE_OPENBSD)) + { + grub_util_warn (_("Attempting to install GRUB to a disk with multiple p= artition labels or both partition label and filesystem. This is not supp= orted yet.")); + goto unable_to_embed; + } + fs =3D grub_fs_probe (dest_dev); if (!fs) grub_errno =3D GRUB_ERR_NONE; --------------040805030806070800030108-- --------------enigD2DA9ED623F3E4FE12AB3A7D 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.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk0kTRMACgkQNak7dOguQgn20wD9EJivmN3IWeyd7TC408ZAT39L c3ieKF90dkCy+cmA1wwA/0gxhVrfV+swzyRGBeFNM/99+rEEQbnnchs0KTAp/MZ7 =kMVZ -----END PGP SIGNATURE----- --------------enigD2DA9ED623F3E4FE12AB3A7D--