summaryrefslogtreecommitdiff
path: root/usr/src/grub
diff options
context:
space:
mode:
authorJan Setje-Eilers <Jan.Setje-Eilers@Sun.COM>2009-07-31 16:55:33 -0700
committerJan Setje-Eilers <Jan.Setje-Eilers@Sun.COM>2009-07-31 16:55:33 -0700
commitbbe6aa77dcdd1ff0ed28cd41788ea266c5fba962 (patch)
treed4317b85ddf87ad4ed12b384613523fc03ff0ed0 /usr/src/grub
parent4f2997b292e45181ce3a682d44c3c14a815d97fd (diff)
downloadillumos-joyent-bbe6aa77dcdd1ff0ed28cd41788ea266c5fba962.tar.gz
6867241 fix for 6866143 breaks pxegrub menu load on non-primary NIC
Diffstat (limited to 'usr/src/grub')
-rw-r--r--usr/src/grub/grub-0.97/stage2/disk_io.c7
-rw-r--r--usr/src/grub/grub-0.97/stage2/fsys_zfs.c8
2 files changed, 8 insertions, 7 deletions
diff --git a/usr/src/grub/grub-0.97/stage2/disk_io.c b/usr/src/grub/grub-0.97/stage2/disk_io.c
index bcb37febba..5e767dc747 100644
--- a/usr/src/grub/grub-0.97/stage2/disk_io.c
+++ b/usr/src/grub/grub-0.97/stage2/disk_io.c
@@ -431,15 +431,8 @@ attempt_mount (void)
{
#ifndef STAGE1_5
for (fsys_type = 0; fsys_type < NUM_FSYS; fsys_type++)
- {
- /*
- * (re)set errnum to 0 in order to clear any state that may have
- * been left from a previous mount (or other) routine.
- */
- errnum = 0;
if ((fsys_table[fsys_type].mount_func) ())
break;
- }
if (fsys_type == NUM_FSYS && errnum == ERR_NONE)
errnum = ERR_FSYS_MOUNT;
diff --git a/usr/src/grub/grub-0.97/stage2/fsys_zfs.c b/usr/src/grub/grub-0.97/stage2/fsys_zfs.c
index 8d5be46475..1d8c99b443 100644
--- a/usr/src/grub/grub-0.97/stage2/fsys_zfs.c
+++ b/usr/src/grub/grub-0.97/stage2/fsys_zfs.c
@@ -1283,6 +1283,7 @@ zfs_mount(void)
char tmp_devid[MAXNAMELEN];
uint64_t tmp_guid;
uint64_t adjpl = (uint64_t)part_length << SPA_MINBLOCKSHIFT;
+ int err = errnum; /* preserve previous errnum state */
/* if it's our first time here, zero the best uberblock out */
if (best_drive == 0 && best_part == 0 && find_best_root) {
@@ -1340,6 +1341,13 @@ zfs_mount(void)
}
}
+ /*
+ * While some fs impls. (tftp) rely on setting and keeping
+ * global errnums set, others won't reset it and will break
+ * when issuing rawreads. The goal here is to simply not
+ * have zfs mount attempts impact the previous state.
+ */
+ errnum = err;
return (0);
}