git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54e91da
)
fuse: Return EXIT_FAILURE if fuse_main fails.
author
Richard W.M. Jones
<rjones@redhat.com>
Fri, 9 Dec 2011 15:30:23 +0000
(15:30 +0000)
committer
Richard W.M. Jones
<rjones@redhat.com>
Fri, 9 Dec 2011 15:30:23 +0000
(15:30 +0000)
fuse_main can return any non-zero value on error. In particular on
certain sorts of error such as unsupported -o options it returns 1
(not -1).
Therefore make sure any non-zero return is turned into EXIT_FAILURE.
(Thanks Pádraig Brady)
fuse/guestmount.c
patch
|
blob
|
history
diff --git
a/fuse/guestmount.c
b/fuse/guestmount.c
index
54ed947
..
7782be1
100644
(file)
--- a/
fuse/guestmount.c
+++ b/
fuse/guestmount.c
@@
-1227,5
+1227,5
@@
main (int argc, char *argv[])
guestfs_close (g);
free_dir_caches ();
- exit (r ==
-1 ? 1 : 0
);
+ exit (r ==
0 ? EXIT_SUCCESS : EXIT_FAILURE
);
}