From b256799eaf829fcb7d6e1d88de4478f77df8ff73 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 25 Oct 2011 10:30:14 +1100 Subject: lib/util Rename samba_init_module -> samba_module_init This is to provide a cleaner namespace in the public samba plugin functions. Andrew Bartlett --- lib/util/internal_module.c | 4 ++-- lib/util/samba_module.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/util/internal_module.c b/lib/util/internal_module.c index b5156fd9e2..a10d1f3a3b 100644 --- a/lib/util/internal_module.c +++ b/lib/util/internal_module.c @@ -57,7 +57,7 @@ samba_module_init_fn load_module(const char *path, bool is_probe, void **handle_ return NULL; } - init_fn = (samba_module_init_fn)dlsym(handle, SAMBA_INIT_MODULE); + init_fn = (samba_module_init_fn)dlsym(handle, SAMBA_MODULE_INIT); /* we could check dlerror() to determine if it worked, because dlsym() can validly return NULL, but what would we do with @@ -65,7 +65,7 @@ samba_module_init_fn load_module(const char *path, bool is_probe, void **handle_ if (init_fn == NULL) { DEBUG(0, ("Unable to find %s() in %s: %s\n", - SAMBA_INIT_MODULE, path, dlerror())); + SAMBA_MODULE_INIT, path, dlerror())); DEBUG(1, ("Loading module '%s' failed\n", path)); dlclose(handle); return NULL; diff --git a/lib/util/samba_module.h b/lib/util/samba_module.h index 0bdf35fa10..6d32fce48e 100644 --- a/lib/util/samba_module.h +++ b/lib/util/samba_module.h @@ -24,13 +24,13 @@ /* Module support */ typedef NTSTATUS (*samba_module_init_fn) (void); -NTSTATUS samba_init_module(void); +NTSTATUS samba_module_init(void); /* this needs to be a string which is not in the C library. We previously used "init_module", but that meant that modules which did not define this function ended up calling the C library function init_module() which makes a system call */ -#define SAMBA_INIT_MODULE "samba_init_module" +#define SAMBA_MODULE_INIT "samba_module_init" /** * Run the specified init functions. -- cgit