summaryrefslogtreecommitdiff
path: root/usr/src/lib/libgrubmgmt/common/libgrub_cmd.c
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2015-04-03 15:27:49 +0300
committerRichard Lowe <richlowe@richlowe.net>2015-04-07 18:04:51 -0400
commit57631629e78d7cda75d1f6ec529fc985298b24f4 (patch)
tree2e16bea799ac1ba16ef064eb72248b614a427169 /usr/src/lib/libgrubmgmt/common/libgrub_cmd.c
parent37915d862fc5cc87b5b702954d7d7f16a9f98e5c (diff)
downloadillumos-gate-57631629e78d7cda75d1f6ec529fc985298b24f4.tar.gz
5786 Fast reboot broken on EFI formatted drives
Reviewed by: Richard PALO <richard@NetBSD.org> Reviewed by: Josef Sipek <jeffpc@josefsipek.net> Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/lib/libgrubmgmt/common/libgrub_cmd.c')
-rw-r--r--usr/src/lib/libgrubmgmt/common/libgrub_cmd.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/usr/src/lib/libgrubmgmt/common/libgrub_cmd.c b/usr/src/lib/libgrubmgmt/common/libgrub_cmd.c
index 5dc12247b1..4166f2ee4c 100644
--- a/usr/src/lib/libgrubmgmt/common/libgrub_cmd.c
+++ b/usr/src/lib/libgrubmgmt/common/libgrub_cmd.c
@@ -402,10 +402,15 @@ findroot(const grub_line_t *lp, grub_barg_t *barg)
return (EG_FINDROOTFMT);
++pos;
- if ((pos[0] != ',' && pos[0] != ')') ||
- !IS_SLCNUM_VALID(barg->gb_slcnum = pos[1]) ||
- pos[2] != ')')
- return (EG_FINDROOTFMT);
+ /*
+ * check the slice only when its presented
+ */
+ if (pos[0] != ')') {
+ if (pos[0] != ',' ||
+ !IS_SLCNUM_VALID(barg->gb_slcnum = pos[1]) ||
+ pos[2] != ')')
+ return (EG_FINDROOTFMT);
+ }
} else {
sz = strlen(sign);
}