Suggestion for change in the vfs_ops structure?
abartlet at samba.org
Wed Nov 13 04:09:00 GMT 2002
On Wed, 2002-11-13 at 13:20, Kris Van Hees wrote:
> Could the passed filenames and pathnames in the functions in vfs_ops be made
> non-const? The use of a VFS module as transparent layer includes the ability
> to change the passed data (as suggested from the comments in vfs.h), but with
> the const qualifiers there, you cannot legally change the passed names without
> generating compiler warnings.
Well, I think that doing so would be *very* dangerous. For one, what
are you doing to do with those strings? Only change them in-place, but
never extend them? You can realloc() those strings, as the pointer
might change, or they might be stack strings, but of what size?
And I'm glad it generates compiler warnings, because it should make you
stop and think 'is this actually a good idea'.
What exactly were you wanting to do anyway?
Andrew Bartlett abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20021113/b7200209/attachment.bin
More information about the samba-technical