From 1c34cd359a9977ede758079d1989a49f00f39a67 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 28 Apr 2003 00:49:49 +0000 Subject: Update for the new modules system. Also, use Makefile rather then Makefile.in because we don't generate Makefile from configure anymore. (This used to be commit 29ba1e163f85aeaa3cd48a13e4f0a039fa80e7b0) --- examples/VFS/Makefile | 23 +++++++++++++++++++++++ examples/VFS/Makefile.in | 24 ------------------------ examples/VFS/skel.c | 8 +++----- 3 files changed, 26 insertions(+), 29 deletions(-) create mode 100644 examples/VFS/Makefile delete mode 100644 examples/VFS/Makefile.in (limited to 'examples') diff --git a/examples/VFS/Makefile b/examples/VFS/Makefile new file mode 100644 index 0000000000..ac5a93b49b --- /dev/null +++ b/examples/VFS/Makefile @@ -0,0 +1,23 @@ +CFLAGS = +CPPFLAGS = +LDFLAGS = +LDSHFLAGS = -shared +srcdir = ../../source/ +FLAGS = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper -I. $(CPPFLAGS) -I$(srcdir) + +# Auto target +default: $(patsubst %.c,%.so,$(wildcard *.c)) + +# Pattern rules + +%.so: %.o + $(CC) $(LDSHFLAGS) $(LDFLAGS) -o $@ $< + +%.o: %.c + $(CC) $(FLAGS) -c $< + +# Misc targets + +clean: + rm -rf .libs + rm -f core *~ *% *.bak *.o *.so diff --git a/examples/VFS/Makefile.in b/examples/VFS/Makefile.in deleted file mode 100644 index 30019caccd..0000000000 --- a/examples/VFS/Makefile.in +++ /dev/null @@ -1,24 +0,0 @@ -CC = @CC@ -CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -LDSHFLAGS = -shared -srcdir = ../../source/ -FLAGS = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper -I. $(CPPFLAGS) -I$(srcdir) - -# Auto target -default: $(patsubst %.c,%.so,$(wildcard *.c)) - -# Pattern rules - -%.so: %.o - $(CC) $(LDSHFLAGS) $(LDFLAGS) -o $@ $< - -%.o: %.c - $(CC) $(FLAGS) -c $< - -# Misc targets - -clean: - rm -rf .libs - rm -f core *~ *% *.bak *.o *.so diff --git a/examples/VFS/skel.c b/examples/VFS/skel.c index b937682822..f19323480f 100644 --- a/examples/VFS/skel.c +++ b/examples/VFS/skel.c @@ -437,12 +437,11 @@ static vfs_op_tuple skel_ops[] = { /* VFS initialisation - return initialized vfs_op_tuple array back to Samba */ -vfs_op_tuple *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops, +static vfs_op_tuple *skel_init(const struct vfs_ops *def_vfs_ops, struct smb_vfs_handle_struct *vfs_handle) { DEBUG(3, ("Initialising default vfs hooks\n")); - *vfs_version = SMB_VFS_INTERFACE_VERSION; memcpy(&default_vfs_ops, def_vfs_ops, sizeof(struct vfs_ops)); /* Remember vfs_handle for further allocation and referencing of private @@ -452,8 +451,7 @@ vfs_op_tuple *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops, return skel_ops; } -/* VFS finalization function */ -void vfs_done(connection_struct *conn) +int init_module(void) { - DEBUG(3, ("Finalizing default vfs hooks\n")); + return smb_register_vfs("skel", skel_init, SMB_VFS_INTERFACE_VERSION); } -- cgit