Received: from list by lists.gnu.org with archive (Exim 4.71) id 1R8Hm4-0005kh-SY for mharc-grub-devel@gnu.org; Mon, 26 Sep 2011 16:27:36 -0400 Received: from eggs.gnu.org ([140.186.70.92]:47865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8Hm2-0005kb-Hs for grub-devel@gnu.org; Mon, 26 Sep 2011 16:27:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R8Hm1-000375-GM for grub-devel@gnu.org; Mon, 26 Sep 2011 16:27:34 -0400 Received: from ausxippc101.us.dell.com ([143.166.85.207]:47471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8Hm1-00036u-Cw for grub-devel@gnu.org; Mon, 26 Sep 2011 16:27:33 -0400 X-Loopcount0: from 10.9.160.253 Message-ID: <4E80E041.5050503@dell.com> Date: Mon, 26 Sep 2011 15:27:45 -0500 From: Mario Limonciello Organization: Dell Inc. User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: "grub-devel@gnu.org" Subject: [PATCH] Reset grub_errno after embedding test on non-fatal failures X-Enigmail-Version: 1.3.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE81E25542A0FDB8DA400BDAC" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 143.166.85.207 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: Mon, 26 Sep 2011 20:27:35 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE81E25542A0FDB8DA400BDAC Content-Type: multipart/mixed; boundary="------------080003050802000301000205" This is a multi-part message in MIME format. --------------080003050802000301000205 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello, In additional MinGW testing, i've found that there are instances where th= e embedding test used in grub-setup will fail to seek on certain devices = (such as card readers where no cards are physically present). This sets = grub_errno during the embedding test as the different disks in the system= are tested. It gets set even when installing to a different disk (all t= he physical disks are seeked). Consequently grub_errno remains set up to= the point when the core image is to be written out and mistakingly will = indicate grub-setup failed for a seek error that happened at the start. So this patch resets grub_errno while completing the embedding test only = on the non fatal failures. Thanks, --=20 *Mario Limonciello* Linux Engineer *Dell*| OS Engineering --------------080003050802000301000205 Content-Type: text/x-diff; name="errno.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="errno.patch" =3D=3D=3D modified file 'ChangeLog' --- ChangeLog 2011-09-17 21:40:10 +0000 +++ ChangeLog 2011-09-26 20:21:14 +0000 @@ -1,3 +1,7 @@ +2011-09-26 Mario Limonciello + + * Reset grub_errno after embedding test on a non-fatal failure. + 2011-09-17 Gr=C3=A9goire Sutre =20 * Makefile.util.def (grub-mkrelpath): Add LIBUTIL for getrawpartition(3= ) =3D=3D=3D modified file 'grub-core/partmap/msdos.c' --- grub-core/partmap/msdos.c 2011-07-07 21:52:58 +0000 +++ grub-core/partmap/msdos.c 2011-09-26 20:22:52 +0000 @@ -253,7 +253,7 @@ return grub_errno; for (i =3D 0; i < *nsectors; i++) (*sectors)[i] =3D 1 + i; - return GRUB_ERR_NONE; + return grub_error(GRUB_ERR_NONE,""); } =20 if (end <=3D 1) --------------080003050802000301000205-- --------------enigE81E25542A0FDB8DA400BDAC 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.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6A4EEACgkQ2CrZjkA73YsHzACgm+jboC/E5TEB0pq5DD/c+WZd /L8AoI1oBiVdEGfBxKw/9L3G6YLVFGOp =5O7a -----END PGP SIGNATURE----- --------------enigE81E25542A0FDB8DA400BDAC--