From: Mario Limonciello <mario_limonciello@dell.com>
To: "grub-devel@gnu.org" <grub-devel@gnu.org>
Subject: [PATCH] Reset grub_errno after embedding test on non-fatal failures
Date: Mon, 26 Sep 2011 15:27:45 -0500 [thread overview]
Message-ID: <4E80E041.5050503@dell.com> (raw)
[-- 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 --]
next reply other threads:[~2011-09-26 20:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 20:27 Mario Limonciello [this message]
2011-09-26 20:32 ` [PATCH] Reset grub_errno after embedding test on non-fatal failures 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E80E041.5050503@dell.com \
--to=mario_limonciello@dell.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.