-
Notifications
You must be signed in to change notification settings - Fork 90
Labels
Description
Describe the bug
ltfs returns 0 even on a failed mount, as it ignores the return code of fuse_main() on
Lines 1337 to 1340 in adb3722
| ret = fuse_main(args->argc, args->argv, <fs_ops, priv); | |
| if (ret != 0) { | |
| ltfsmsg(LTFS_WARN, 14123W, ret); | |
| } |
The return code of
fuse_main() is overwritten a few lines below, so the error is never propagated Line 1343 in adb3722
| ret = ltfs_set_signal_handlers(); |
I would suggest replacing
LTFS_WARN with LTFS_ERR and adding a return ret; right after the ltfsmsg to fix this.
To Reproduce
mkdir /tmp/ltfs
touch /tmp/ltfs/foo
ltfs -o devname=9A700L0077 /tmp/ltfs
echo $?