From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OLjFA-0001i9-Uc for mharc-grub-devel@gnu.org; Mon, 07 Jun 2010 16:48:24 -0400 Received: from [140.186.70.92] (port=50009 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLjF5-0001gO-AH for grub-devel@gnu.org; Mon, 07 Jun 2010 16:48:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLjEz-0006Pl-E8 for grub-devel@gnu.org; Mon, 07 Jun 2010 16:48:19 -0400 Received: from ey-out-1920.google.com ([74.125.78.147]:10645) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLjEz-0006PY-5v for grub-devel@gnu.org; Mon, 07 Jun 2010 16:48:13 -0400 Received: by ey-out-1920.google.com with SMTP id 13so224116eye.2 for ; Mon, 07 Jun 2010 13:48:12 -0700 (PDT) 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:subject:references:in-reply-to :x-enigmail-version:content-type; bh=1AIMurl1a/+A3DZWnDXzDbH2aWfr5iu9RJeT14R3m4s=; b=k+x8sBYG1+KkV+fjooGwqA+h1POjNkF6UQF1KhFunGO1vr8HwePea7DHKSfaqg/Gno BaMYi2/RsLNVLnhb5eLRJV+LX6ZZAjHfplr3e358WZYGjvqj48bO4Hz2/tg9gtj+7/u3 D15N+BNVAz5JzojdDXehd70Q9znqz63jRP6SA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=m/jLmckzB2TdPz3Qs98BuqK1OHTFLyiiXokVcqIjKHQpW7fNFLaMP/4KINZTxByFQR +J/CQOoZv7n7uRPFd3RSTkK1vwVZlLeZxvWtKYAgHUlZP0I5QKRUjH2RisEEX67QHWRG pYH9gPpqt/lrhBUNSnwuexLb4t3+KubESzTIQ= Received: by 10.213.15.146 with SMTP id k18mr11422585eba.80.1275943692120; Mon, 07 Jun 2010 13:48:12 -0700 (PDT) Received: from debian.bg45.phnet (gprs27.swisscom-mobile.ch [193.247.250.27]) by mx.google.com with ESMTPS id 16sm2874143ewy.15.2010.06.07.13.48.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 07 Jun 2010 13:48:11 -0700 (PDT) Message-ID: <4C0D5B06.8000209@gmail.com> Date: Mon, 07 Jun 2010 22:48:06 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100515 Icedove/3.0.4 MIME-Version: 1.0 To: The development of GNU GRUB References: <4C0998AC.5010405@gmail.com> In-Reply-To: <4C0998AC.5010405@gmail.com> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig818151605A748455724A9F2F" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [Patch] Use absolute offset for embedding area in grub-setup (i386-pc) 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: Mon, 07 Jun 2010 20:48:23 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig818151605A748455724A9F2F Content-Type: multipart/alternative; boundary="------------080301040604080807000800" This is a multi-part message in MIME format. --------------080301040604080807000800 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/05/2010 02:22 AM, Gr=C3=A9goire Sutre wrote: > Hi, > > The attached patch uses grub_partition_get_start (p) instead of p->star= t > in grub-setup's iteration over partitions. While we are at it, also > use grub_partition_get_len (p) instead of p->len. Go ahead > > An alternative would be to assume that partitions are properly nested, > and therefore iterate only over the top-level ones (i.e. those with > p->parent =3D=3D NULL). In that case, we could equivalently use p->sta= rt. > > > In the check for non-empty embedding area, the patch uses <=3D instead = of > =3D=3D (as we may have embed_region.start =3D=3D 1 && embed_region.end = =3D=3D 0). > > Comments? > > Gr=C3=A9goire > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > =20 --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------080301040604080807000800 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/05/2010 02:22 AM, Gr=C3=A9goire Sutre wrote:
Hi,

The attached patch uses grub_partition_get_start (p) instead of p->start
in grub-setup's iteration over partitions.=C2=A0 While we are at it, also=
use grub_partition_get_len (p) instead of p->len.
Go ahead

An alternative would be to assume that partitions are properly nested,
and therefore iterate only over the top-level ones (i.e. those with
p->parent =3D=3D NULL).=C2=A0 In that case, we could equivalently use p->start.


In the check for non-empty embedding area, the patch uses <=3D instead= of
=3D=3D (as we may have embed_region.start =3D=3D 1 && embed_regio= n.end =3D=3D 0).

Comments?

Gr=C3=A9goire
_______________________________________________ Grub-devel mailing list = Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel


--=20
Regards
Vladimir '=CF=86-coder/phcoder' Serbinenko
--------------080301040604080807000800-- --------------enig818151605A748455724A9F2F 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/ iF4EAREKAAYFAkwNWwYACgkQNak7dOguQgkHSgEAgJ3/dis+Orz7S9UWCImH6wjM G4wAzenEBVztOeDzR5UA/jgEy2q7hMhBaQKEnrFjbXWt8ygRx+QJl814mBxlbomq =ctuh -----END PGP SIGNATURE----- --------------enig818151605A748455724A9F2F--