Skip to content

Commit 46465a5

Browse files
amissael95Missael Palacios
andauthored
Added warning when fuse_main return code is not 0 (#413)
Co-authored-by: Missael Palacios <missaelpalacios@ibm.com>
1 parent 559da4b commit 46465a5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

messages/bin_ltfs/root.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ root:table {
153153
14114E:string { "Cannot initialize the open file table." }
154154
14115E:string { "Invalid scsi_append_only_mode option: %s." }
155155
14116E:string { "This medium is not supported (%d)." }
156-
156+
14123W:string { "The main function of FUSE returned error (%d)." }
157+
157158
// 14150 - 14199 are reserved for LE+
158159

159160
// Help messages

src/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,9 @@ int single_drive_main(struct fuse_args *args, struct ltfs_fuse_data *priv)
12421242
ltfsmsg(LTFS_INFO, 14112I);
12431243
ltfsmsg(LTFS_INFO, 14113I);
12441244
ret = fuse_main(args->argc, args->argv, &ltfs_ops, priv);
1245+
if (ret != 0) {
1246+
ltfsmsg(LTFS_WARN, 14123W, ret);
1247+
}
12451248

12461249
/* Setup signal handler again to terminate cleanly */
12471250
ret = ltfs_set_signal_handlers();

0 commit comments

Comments
 (0)