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:
0e51743
)
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:35:50 +0000
(15:35 +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)
(cherry picked from commit
ae45cee728039d7724fc73e5ffb2550c8054d268
)
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
);
}