Handle pool names with trailing spaces Index: grub/util/getroot.c =================================================================== --- grub.orig/util/getroot.c 2012-01-31 01:05:12.387005000 -0600 +++ grub/util/getroot.c 2012-01-31 01:05:13.196100000 -0600 @@ -260,7 +260,7 @@ char cksum[257], notes[257]; unsigned int dummy; - cmd = xasprintf ("zpool status %s", poolname); + cmd = xasprintf ("zpool status \"%s\"", poolname); fp = popen (cmd, "r"); free (cmd); @@ -286,7 +286,8 @@ st++; break; case 1: - if (!strcmp (name, poolname)) + /* strncmp is used because pools can technically have trailing spaces. */ + if (!strncmp (name, poolname, strlen (name))) st++; break; case 2: