注意:我读了FUSE error: Transport endpoint is not connected,但没有帮助。
我正在使用FUSE API:https://github.com/libfuse/libfuse
我创建了一个小项目来测试库。 main
看起来像:
(...)
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 );
(...)
我的程序通过以下方式启动:
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
我也尝试过
sudo umount -l ./tmp_fuse
有/没有定影器,但是我遇到了同样的问题。
启动我的应用程序后,/etc/mtab
的最后一行是
test.xml /path/to/tmp_fuse fuse.test.xml rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
谢谢您的帮助。
P。
答案 0 :(得分:0)
让它缺少一个简单的内存集:-)
struct fuse_operations operations;
memset((void*)&operations,0,sizeof(struct fuse_operations));
operations.open = htsfuse_open;
operations.read = htsfuse_read;