From ae45cee728039d7724fc73e5ffb2550c8054d268 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 9 Dec 2011 15:30:23 +0000 Subject: [PATCH] fuse: Return EXIT_FAILURE if fuse_main fails. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 1.8.3.1