Inconsistent naming of vfs_read in the VFS Function pointer structure ...

Christopher R. Hertel christopher.hertel at gmail.com
Sat Nov 26 15:42:54 MST 2011


simo wrote:
> On Sat, 2011-11-26 at 13:19 -0800, Richard Sharpe wrote: 
>> Hi folks,
>>
>> I came across this:
>>
>>         /* File operations */
>>
>>         .open_fn = vfswrap_open,
>>         .create_file = vfswrap_create_file,
>>         .close_fn = vfswrap_close,
>>         .vfs_read = vfswrap_read,
>>         .pread = vfswrap_pread,
>>         .write = vfswrap_write,
>>         .pwrite = vfswrap_pwrite,
>>         .lseek = vfswrap_lseek,
>>
>> Is there any reason that it is vfs_read and not just read?
> 
> It may be for the same reason we had to change open -> open_fn, because
> glibc at some point made open() into a macro. It is possible the same
> happened for read() I guess, on some platform.
> 
> Granted, maybe using read_fn would have been more consistent :)

Why not rename them all to end in _fn?

Chris -)-----

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org


More information about the samba-technical mailing list