X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Finitrd.c;h=9c92fee598bc24e4d054f0a0b2da93d6778f04b2;hp=e7034817df7a291ad66867238aa5dbeffdb03007;hb=688bdc1a068a6c0bea58addd04d5bbe6dc1940c4;hpb=0dd6c8c8442d4ff588f6dac2efab24d3409b0dec diff --git a/daemon/initrd.c b/daemon/initrd.c index e703481..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, return 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");