X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Ffallocate.c;h=0c948ffff6ebc3fa5d884f4caf5aa4ea2de6b3cd;hp=494743075854fd814555535592c2a3c3fd07d6be;hb=6b500f1b8e1ac8d28c485a5591c2833b18cc86e2;hpb=2ade61d1f864c75ce65c358e4ac8a012a897b89a;ds=sidebyside diff --git a/daemon/fallocate.c b/daemon/fallocate.c index 4947430..0c948ff 100644 --- a/daemon/fallocate.c +++ b/daemon/fallocate.c @@ -31,6 +31,17 @@ int do_fallocate (const char *path, int len) { + if (len < 0) { + reply_with_error ("length < 0"); + return -1; + } + + return do_fallocate64 (path, len); +} + +int +do_fallocate64 (const char *path, int64_t len) +{ int fd; CHROOT_IN;