From: Richard S. <rea...@gm...> - 2014-07-06 18:07:32
|
On Sun, Jul 6, 2014 at 10:37 AM, Behrooz Shafiee <sha...@gm...> wrote: > Hello everyone, > > I am developing an educational file system, and everything has gone well > so far except readdir function. The problem is that myFS_readdir is always > being called with "path" argument equals to NULL. Do you have any idea why > path is always NULL? it's fine in other functions such as getattr,... > I appreciate any help or comment. Let me know if you have any question. I > use fuse-2.9.3 on 64 bit ubuntu. and here are my compile flags: -O2 -g > -Wall -fmessage-length=0 -D_FILE_OFFSET_BITS=64 -std=c++11 Well, this http://fuse.sourceforge.net/doxygen/structfuse__lowlevel__ops.html#af1ef8e59e0cb0b02dc0e406898aeaa51 says: "fi->fh will contain the value set by the opendir method, or will be undefined if the opendir method didn't set any value." which suggests that if you return a file handle in the opendir method, readdir will be relative to that fh, otherwise a path will be supplied. That, at least, is the way the FUSE fs I am currently working on does things. -- Regards, Richard Sharpe (何以解憂?唯有杜康。--曹操) |