From 1045f5a1a2bd6252fb89d41641cebff95325cdfb Mon Sep 17 00:00:00 2001 From: mauricio Date: Wed, 27 Aug 2025 11:25:07 -0600 Subject: [PATCH] fix: fuse_main error change the fuse main error handling --- messages/bin_ltfs/root.txt | 2 +- src/main.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/messages/bin_ltfs/root.txt b/messages/bin_ltfs/root.txt index 043aea02..b041f979 100644 --- a/messages/bin_ltfs/root.txt +++ b/messages/bin_ltfs/root.txt @@ -159,7 +159,7 @@ root:table { 14120W:string { "Cannot access to directory %s, disabled index capture mode (%d)." } 14121I:string { "Index will be captured at %s at update" } 14122I:string { "Index will not be captured." } - 14123W:string { "The main function of FUSE returned error (%d)." } + 14123E:string { "The main function of FUSE returned (%d) errno (%d)." } // 14150 - 14199 are reserved for LE+ diff --git a/src/main.c b/src/main.c index 0add6121..e67793df 100644 --- a/src/main.c +++ b/src/main.c @@ -1336,7 +1336,8 @@ int single_drive_main(struct fuse_args *args, struct ltfs_fuse_data *priv) ltfsmsg(LTFS_INFO, 14113I); ret = fuse_main(args->argc, args->argv, <fs_ops, priv); if (ret != 0) { - ltfsmsg(LTFS_WARN, 14123W, ret); + ltfsmsg(LTFS_ERR, 14123E, ret, errno); + return ret; } /* Setup signal handler again to terminate cleanly */