X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Finitrd.c;h=9c92fee598bc24e4d054f0a0b2da93d6778f04b2;hb=835c0186c8771bb1c850f6c82356f9c731323413;hp=c1c7ce03aa744662361a3141e4f50031942844ec;hpb=6bda071b5cd8393b37653687027c4ae6c6cf3804;p=libguestfs.git diff --git a/daemon/initrd.c b/daemon/initrd.c index c1c7ce0..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 (return 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");