Search code examples
cendpointfuse

FUSE: Transport endpoint is not connected


Note: I read FUSE error: Transport endpoint is not connected but it doesn't help.

I'm working with the FUSE API: https://github.com/libfuse/libfuse

I created a small project to test the library. The main looks like:

(...)
    struct fuse_operations operations;
    operations.open = htsfuse_open;
    operations.read = htsfuse_read;
    operations.release = htsfuse_release;
    operations.readdir = htsfuse_readdir;
    operations.getattr = htsfuse_getattr;

    int ret= fuse_main( argc-1, &argv[1], &operations,NULL );
(...)

my program is launched with:

sudo fusermount -u tmp_fuse && rm -rf tmp_fuse
mkdir -p tmp_fuse
./htsfuse config.xml ${PWD}/tmp_fuse
ls tmp_fuse
ls: cannot access 'tmp_fuse': Transport endpoint is not connected

I also tried to

 sudo umount -l ./tmp_fuse

with/without fusermount but I got the same problem.

After my application is launched, the last line of /etc/mtab is

test.xml /path/to/tmp_fuse fuse.test.xml rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0

Thank you for your help.

P.


Solution

  • got it a simple memset was missing :-)

    struct fuse_operations operations;
    memset((void*)&operations,0,sizeof(struct fuse_operations));
    operations.open = htsfuse_open;
    operations.read = htsfuse_read;