git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add_drive: Don't use cache=off if not supported by underlying filesystem.
[libguestfs.git]
/
daemon
/
file.c
diff --git
a/daemon/file.c
b/daemon/file.c
index
6062c50
..
cd477e5
100644
(file)
--- a/
daemon/file.c
+++ b/
daemon/file.c
@@
-97,18
+97,18
@@
do_cat (char *path)
if (size >= alloc) {
alloc += 8192;
if (alloc > max) {
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) {
}
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;
}
}
buf = buf2;
}
@@
-392,7
+392,6
@@
do_file (char *path)
int len;
NEED_ROOT_OR_IS_DEVICE (path, NULL);
int len;
NEED_ROOT_OR_IS_DEVICE (path, NULL);
- ABS_PATH (path, NULL);
if (strncmp (path, "/dev/", 5) == 0)
buf = (char *) path;
if (strncmp (path, "/dev/", 5) == 0)
buf = (char *) path;
@@
-416,7
+415,7
@@
do_file (char *path)
return NULL;
}
return NULL;
}
- r = command (&out, &err, "file", "-bsL", buf, NULL);
+ r = command (&out, &err, "file", "-
z
bsL", buf, NULL);
if (freeit) free (buf);
if (r == -1) {
if (freeit) free (buf);
if (r == -1) {