vfs open/close

Jeremy Allison jra at samba.org
Wed May 25 23:15:10 GMT 2005


On Thu, May 26, 2005 at 01:09:49AM +0200, Julien Thomas wrote:
> 
> static int inrastats_open (vfs_handle_struct *handle,
>                          connection_struct *conn,
>                          const char *fname,
>                          int flags,
>                          mode_t mode);
> 
> static int inrastats_close(vfs_handle_struct *handle,
>                      files_struct *fsp,
>                      int fd);
> 
> So I am able to get fnum from "files_struct *fsp" in the close op, but 
> is the files_struct can be obtain using the params of the vfs open 
> operation ? I discover many things every time I take a look in the *.h 
> of source/include/ but the there are many many functions and types !!! 
> It's first time I try to understand (just a part of) sources of a 
> project... and... hard :) .

Sorry, especially when you get bum advice from idiots like me :-).

You are correct, it isn't the fnum that you can key off, but the
fd parameter - this is the integer that you return in the vfs_open()
call and is the integer passed to you as the last parameter in the
vfs_close() call. 

Match those up and you should be ok.

Jeremy.


More information about the samba-technical mailing list