From: Richard W.M. Jones Date: Fri, 9 Dec 2011 15:30:23 +0000 (+0000) Subject: fuse: Return EXIT_FAILURE if fuse_main fails. X-Git-Tag: 1.14.7~1 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=8ea8e456dc87e4c26f2ede1b00ab617e5d69b064;p=libguestfs.git fuse: Return EXIT_FAILURE if fuse_main fails. 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) --- diff --git a/fuse/guestmount.c b/fuse/guestmount.c index 54ed947..7782be1 100644 --- 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); }