rofiles-fuse: Fixed the problem that when fuse execution fails, the command returns...
authorqiuzhiqian <xiamengliang@gmail.com>
Tue, 3 Dec 2024 12:33:48 +0000 (20:33 +0800)
committerqiuzhiqian <xiamengliang@gmail.com>
Tue, 3 Dec 2024 12:38:35 +0000 (20:38 +0800)
testcase:
`$ sudo rofiles-fuse a b`
fuse: bad mount point `b': No such file or directory
`$ echo $?`
0

src/rofiles-fuse/main.c

index 0c267ea9b1dd410bd36a06c765c80982906b3c46..abf355e5404d4f808566e9b0d99d670662156173 100644 (file)
@@ -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));
 }