vfs open/close
Julien Thomas
omnikron at free.fr
Thu May 26 06:45:02 GMT 2005
Jeremy Allison wrote:
>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.
>
I thought I tried this...
Do you think that when the same file is open, the fd integer is
different ? I don't have time to test but I remember I test something
like this with no success.
I'm may be wrong but in a same connection (same vfs module
registration), if I open a file, close it, and reopen/close the same
file, fd integer will be different ? I think not.
Thanks,
Julien.
More information about the samba-technical
mailing list