VFS module in HEAD

REYNAUD Jean-Samuel reynaud at nantes.inra.fr
Thu Aug 2 10:37:47 GMT 2001

I've modifie the skel module to use it with the HEAD branche.
I've used the SMB_VFS_INTERFACE_VERSION 2. So the vfs_init function

struct vfs_ops *vfs_init(int *vfs_version,struct vfs_ops *conn_vfs_ops)
  default_vfs_ops = *conn_vfs_ops;

But the compilation don't work:
$ make skel.so
libtool gcc  -I../../source -I../../source/include -I../../source/ubiqx
-I../../source/smbwrapper -Wall -g -c skel.c
gcc -I../../source -I../../source/include -I../../source/ubiqx
-I../../source/smbwrapper -Wall -g -c skel.c  -fPIC -DPIC -o
skel.c:154: conflicting types for `vfs_init'
../../source/include/proto.h:4483: previous declaration of `vfs_init'
make: *** [skel.lo] Erreur 1

the module's vfs_init prototype conflict with the proto.h's vfs_init

In fact, the smbd/vfs.c's vfs_init function had the prototype:
BOOL vfs_init(connection_struct *conn)

Perhaps, the solution is to change the vfs_init function name for
modules (example : vfs_init_module...)

So the vfs.c's loading become:
init_fptr = (struct vfs_ops *(*)(int *, struct vfs_ops
*))sys_dlsym(conn->dl_handle, "vfs_init_module");

REYNAUD Jean-Samuel

More information about the samba-technical mailing list