I am implementing a FUSE filesystem and as a first step have implemented only the getattr
function. The code looks like this:
int test_getattr(const char *path, struct stat *statbuf){
return lstat(path, statbuf);
}
The code works fine when I give any directory other than the directory on which the FUSE is mounted. For example, the above code works for /home
, /home/ubuntu/mnt/
, but hangs on lstat
when path is /home/ubuntu/mnt/fuse/
where /home/ubuntu/mnt/fuse/
is the path passed to fuse_main. The code just hangs at lstat
.