X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Ffallocate.c;h=20a75e67f5f3218d1ee108c9ef082e75afc7da73;hb=13432f02ca29eecaa61c8d66c7c52f9b70b2b3be;hp=f61c496ec2858487a4ae32126e1bd868f80abd0f;hpb=0dd6c8c8442d4ff588f6dac2efab24d3409b0dec;p=libguestfs.git diff --git a/daemon/fallocate.c b/daemon/fallocate.c index f61c496..20a75e6 100644 --- a/daemon/fallocate.c +++ b/daemon/fallocate.c @@ -28,18 +28,15 @@ #include "actions.h" int -do_fallocate (char *path, int len) +do_fallocate (const char *path, int len) { int fd, r; - NEED_ROOT (-1); - ABS_PATH (path, return -1); - CHROOT_IN; fd = open (path, O_WRONLY | O_CREAT | O_TRUNC | O_NOCTTY, 0666); CHROOT_OUT; if (fd == -1) { - reply_with_perror (path); + reply_with_perror ("failed to open %s", path); return -1; }