Skip to content

Conversation

madjesc
Copy link

@madjesc madjesc commented Aug 27, 2025

change the fuse main error handling

Description

Fix #541
Now the main function does not ignore the return code of fuse_main and uses the errno that fuse_main sets for better logging information

Type of change

Please delete items that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have confirmed my fix is effective or that my feature works

change the fuse main error handling
Copy link

@Magic-Kowel Magic-Kowel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks good job!!

@FilipeMaia
Copy link

Thanks!

@@ -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, &ltfs_ops, priv);
if (ret != 0) {
ltfsmsg(LTFS_WARN, 14123W, ret);
ltfsmsg(LTFS_ERR, 14123E, ret, errno);
return ret;
Copy link
Contributor

@amissael95 amissael95 Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @madjesc, did you test that change? I created the message as a warning previously because the fuse_main return code was not checked before and I did not want to return inmediately since we were not able to replicate an issue when doing FUSE. Now that we have more experience a test can be defined to confirm that the return is safe to add.

Copy link
Contributor

@amissael95 amissael95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please perform a test to confirm that returning inmediately is safe to add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ltfs returns 0 even on failed mount (or other fuse errors)
4 participants