Skip to content

Commit 1045f5a

Browse files
author
mauricio
committed
fix: fuse_main error
change the fuse main error handling
1 parent adb3722 commit 1045f5a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

messages/bin_ltfs/root.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ root:table {
159159
14120W:string { "Cannot access to directory %s, disabled index capture mode (%d)." }
160160
14121I:string { "Index will be captured at %s at update" }
161161
14122I:string { "Index will not be captured." }
162-
14123W:string { "The main function of FUSE returned error (%d)." }
162+
14123E:string { "The main function of FUSE returned (%d) errno (%d)." }
163163

164164
// 14150 - 14199 are reserved for LE+
165165

src/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,8 @@ int single_drive_main(struct fuse_args *args, struct ltfs_fuse_data *priv)
13361336
ltfsmsg(LTFS_INFO, 14113I);
13371337
ret = fuse_main(args->argc, args->argv, &ltfs_ops, priv);
13381338
if (ret != 0) {
1339-
ltfsmsg(LTFS_WARN, 14123W, ret);
1339+
ltfsmsg(LTFS_ERR, 14123E, ret, errno);
1340+
return ret;
13401341
}
13411342

13421343
/* Setup signal handler again to terminate cleanly */

0 commit comments

Comments
 (0)