From 8346244443de4ef327b8c9638068a156d737cfcb Mon Sep 17 00:00:00 2001 From: qiuzhiqian Date: Tue, 3 Dec 2024 20:33:48 +0800 Subject: [PATCH] rofiles-fuse: Fixed the problem that when fuse execution fails, the command returns a status code of 0 testcase: `$ sudo rofiles-fuse a b` fuse: bad mount point `b': No such file or directory `$ echo $?` 0 --- src/rofiles-fuse/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rofiles-fuse/main.c b/src/rofiles-fuse/main.c index 0c267ea9b1..abf355e540 100644 --- a/src/rofiles-fuse/main.c +++ b/src/rofiles-fuse/main.c @@ -756,7 +756,6 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); } - fuse_main (args.argc, args.argv, &callback_oper, NULL); - - return 0; + // Refer to https://man.openbsd.org/fuse_main.3 + return (fuse_main (args.argc, args.argv, &callback_oper, NULL)); }