备注:我读了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.
发布于 2018-10-11 08:44:22
明白了吗?一个简单的memset不见了:-)
struct fuse_operations operations;
memset((void*)&operations,0,sizeof(struct fuse_operations));
operations.open = htsfuse_open;
operations.read = htsfuse_read;https://stackoverflow.com/questions/52740629
复制相似问题