grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Reset grub_errno after embedding test on non-fatal failures
@ 2011-09-26 20:27 Mario Limonciello
  2011-09-26 20:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 6+ messages in thread
From: Mario Limonciello @ 2011-09-26 20:27 UTC (permalink / raw)
  To: grub-devel@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 776 bytes --]

Hello,

In additional MinGW testing, i've found that there are instances where the 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 the 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,

-- 
*Mario Limonciello*
Linux Engineer
*Dell*| OS Engineering

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: errno.patch --]
[-- Type: text/x-diff; name="errno.patch", Size: 779 bytes --]

=== 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 <mario_limonciello@dell.com>
+
+	* Reset grub_errno after embedding test on a non-fatal failure.
+
 2011-09-17  Grégoire Sutre  <gregoire.sutre@gmail.com>
 
 	* Makefile.util.def (grub-mkrelpath): Add LIBUTIL for getrawpartition(3)

=== 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 = 0; i < *nsectors; i++)
 	(*sectors)[i] = 1 + i;
-      return GRUB_ERR_NONE;
+      return grub_error(GRUB_ERR_NONE,"");
     }
 
   if (end <= 1)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-08 14:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-26 20:27 [PATCH] Reset grub_errno after embedding test on non-fatal failures Mario Limonciello
2011-09-26 20:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-09-27 19:38   ` Seth Goldberg
2011-11-08 14:36     ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-09-27 19:39   ` (Subject on previous email) Seth Goldberg
2011-09-28 21:45     ` Vladimir 'φ-coder/phcoder' Serbinenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).