Handle pool names with spaces Index: grub/util/getroot.c =================================================================== --- grub.orig/util/getroot.c 2012-02-03 05:21:06.838056692 -0600 +++ grub/util/getroot.c 2012-02-03 05:22:36.227364000 -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); @@ -285,8 +285,7 @@ st++; break; case 1: - if (!strcmp (name, poolname)) - st++; + st++; break; case 2: if (strcmp (name, "mirror") && !sscanf (name, "mirror-%u", &dummy) @@ -420,6 +419,9 @@ if (sscanf (sep, "%s %s", entry.fstype, entry.device) != 2) continue; + unescape (entry.fstype); + unescape (entry.device); + /* Using the mount IDs, find out where this fits in the list of visible mount entries we've seen so far. There are three interesting cases. Firstly, it may be inserted at the end: this is