mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
osdep/unix/getroot: Pass -P to zpool status
zpool status by default prints basenames of VDEVs, which means that GRUB would have to go around guessing to see whether a VDEV exists. Instead, it'd be more robust to simply tell zpool to give us full paths to VDEVs via -P. Signed-off-by: Arsen Arsenović <arsen@aarsen.me> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
f5759a878e
commit
06e77f2750
1 file changed
+4
-3
@@ -229,14 +229,15 @@ grub_util_find_root_devices_from_poolname (char *poolname)
|
|||||||
char name[PATH_MAX + 1], state[257], readlen[257], writelen[257];
|
char name[PATH_MAX + 1], state[257], readlen[257], writelen[257];
|
||||||
char cksum[257], notes[257];
|
char cksum[257], notes[257];
|
||||||
unsigned int dummy;
|
unsigned int dummy;
|
||||||
const char *argv[4];
|
const char *argv[5];
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
argv[0] = "zpool";
|
argv[0] = "zpool";
|
||||||
argv[1] = "status";
|
argv[1] = "status";
|
||||||
argv[2] = poolname;
|
argv[2] = "-P";
|
||||||
argv[3] = NULL;
|
argv[3] = poolname;
|
||||||
|
argv[4] = NULL;
|
||||||
|
|
||||||
pid = grub_util_exec_pipe (argv, &fd);
|
pid = grub_util_exec_pipe (argv, &fd);
|
||||||
if (!pid)
|
if (!pid)
|
||||||
|
|||||||
Reference in new issue
Block a user