X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=daemon%2Ffile.c;h=63d8dd2d857a2597b5817f21c7c309e2dc0c9e69;hb=7e9cb884492aec243337ffc8e4432a9ff2690956;hp=6062c50d55fbc277f328a71eb849ac6298ab54f7;hpb=0f2e9c84e9ff1071260770930068642ecc8ac0d9;p=libguestfs.git diff --git a/daemon/file.c b/daemon/file.c index 6062c50..63d8dd2 100644 --- a/daemon/file.c +++ b/daemon/file.c @@ -97,18 +97,18 @@ do_cat (char *path) if (size >= alloc) { alloc += 8192; if (alloc > max) { - reply_with_error ("cat: %s: file is too large for message buffer", - path); - free (buf); - close (fd); - return NULL; + reply_with_error ("cat: %s: file is too large for message buffer", + path); + free (buf); + close (fd); + return NULL; } buf2 = realloc (buf, alloc); if (buf2 == NULL) { - reply_with_perror ("realloc"); - free (buf); - close (fd); - return NULL; + reply_with_perror ("realloc"); + free (buf); + close (fd); + return NULL; } buf = buf2; } @@ -416,7 +416,7 @@ do_file (char *path) return NULL; } - r = command (&out, &err, "file", "-bsL", buf, NULL); + r = command (&out, &err, "file", "-zbsL", buf, NULL); if (freeit) free (buf); if (r == -1) {