git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
virt-inspector --fish: Fix incorrect '-a' parameter (RHBZ#512709)
[libguestfs.git]
/
daemon
/
initrd.c
diff --git
a/daemon/initrd.c
b/daemon/initrd.c
index
7b32a08
..
392b811
100644
(file)
--- a/
daemon/initrd.c
+++ b/
daemon/initrd.c
@@
-41,14
+41,15
@@
do_initrd_list (char *path)
ABS_PATH (path, NULL);
/* "zcat /sysroot/<path> | cpio --quiet -it", but path must be quoted. */
ABS_PATH (path, NULL);
/* "zcat /sysroot/<path> | cpio --quiet -it", but path must be quoted. */
- len = 64 + 2 * strlen (path);
+ len = 64 +
sysroot_len +
2 * strlen (path);
cmd = malloc (len);
if (!cmd) {
reply_with_perror ("malloc");
return NULL;
}
cmd = malloc (len);
if (!cmd) {
reply_with_perror ("malloc");
return NULL;
}
- strcpy (cmd, "zcat /sysroot");
+ strcpy (cmd, "zcat ");
+ strcat (cmd, sysroot);
shell_quote (cmd+13, len-13, path);
strcat (cmd, " | cpio --quiet -it");
shell_quote (cmd+13, len-13, path);
strcat (cmd, " | cpio --quiet -it");