X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Finitrd.c;h=9c92fee598bc24e4d054f0a0b2da93d6778f04b2;hb=f1dc74b8d605c07f4b8d4ca0b8dcf3db8c18edd1;hp=59749bba89967addfe6f0204f2371d39134cd377;hpb=0f2e9c84e9ff1071260770930068642ecc8ac0d9;p=libguestfs.git diff --git a/daemon/initrd.c b/daemon/initrd.c index 59749bb..9c92fee 100644 --- a/daemon/initrd.c +++ b/daemon/initrd.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "../src/guestfs_protocol.h" @@ -28,7 +29,7 @@ #include "actions.h" char ** -do_initrd_list (char *path) +do_initrd_list (const char *path) { FILE *fp; char *cmd; @@ -37,9 +38,6 @@ do_initrd_list (char *path) int size = 0, alloc = 0; size_t len; - NEED_ROOT (NULL); - ABS_PATH (path, NULL); - /* "zcat /sysroot/ | cpio --quiet -it", but path must be quoted. */ if (asprintf_nowarn (&cmd, "zcat %R | cpio --quiet -it", path) == -1) { reply_with_perror ("asprintf");