Detecting that the file system has mounted (operation init?)

25 views
Skip to first unread message

Alejandro Exojo

unread,
Mar 15, 2016, 2:31:28 PM3/15/16
to osxfus...@googlegroups.com
Hi.

I have an issue in my application. I need to detect if the file system
has _successfully_ mounted. Since fuse_loop (or fuse_main or
equivalent) just blocks in case of success, I normally just get the
error when it fails, but not if success.

I wonder if "init()" in struct fuse_operations can/should be used for
that? I can see that is called before some things, but I don't know
how I can confirm that it is definitely called just after a successful
mount.

Reasons why I ask are two. First, is that I need to add the mounted
folder to Finder's favorites, and Finder keeps making the folder
disappear sometimes, just after I mount...

Second reason, that sometimes the fuse_loop call blocks forever,
without the file system mounting at all. I tried running with the
debug option, but FUSE prints nothing then. If the init() callback is
called after success, at least I could try to time out to detect
failure.

Thank you.
Reply all
Reply to author
Forward
0 new messages