summaryrefslogtreecommitdiff
path: root/lib/util/modules.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-10-24 09:49:26 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-10-28 13:10:28 +0200
commit1935b7b6c223542c1807e275c44e6ba4b2e90b68 (patch)
tree3f3c92eb3a080d3f68761f1431176e99c4046dbb /lib/util/modules.c
parent7cf00e3231da1808a5ad1adf8fbc319846eacabe (diff)
downloadsamba-1935b7b6c223542c1807e275c44e6ba4b2e90b68.tar.gz
samba-1935b7b6c223542c1807e275c44e6ba4b2e90b68.tar.bz2
samba-1935b7b6c223542c1807e275c44e6ba4b2e90b68.zip
lib/util Rename init_module_fn to samba_init_module_fn
This prepares for making the samba_module.h header public again, for OpenChange. I am keen to avoid too much API namespace pollution if we can.
Diffstat (limited to 'lib/util/modules.c')
-rw-r--r--lib/util/modules.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/util/modules.c b/lib/util/modules.c
index 52a04be457..a597191c93 100644
--- a/lib/util/modules.c
+++ b/lib/util/modules.c
@@ -28,7 +28,7 @@
/**
* Obtain the init function from a shared library file
*/
-init_module_fn load_module(const char *path, bool is_probe, void **handle_out)
+samba_init_module_fn load_module(const char *path, bool is_probe, void **handle_out)
{
void *handle;
void *init_fn;
@@ -57,7 +57,7 @@ init_module_fn load_module(const char *path, bool is_probe, void **handle_out)
return NULL;
}
- init_fn = (init_module_fn)dlsym(handle, SAMBA_INIT_MODULE);
+ init_fn = (samba_init_module_fn)dlsym(handle, SAMBA_INIT_MODULE);
/* we could check dlerror() to determine if it worked, because
dlsym() can validly return NULL, but what would we do with
@@ -75,20 +75,20 @@ init_module_fn load_module(const char *path, bool is_probe, void **handle_out)
*handle_out = handle;
}
- return (init_module_fn)init_fn;
+ return (samba_init_module_fn)init_fn;
}
/**
* Obtain list of init functions from the modules in the specified
* directory
*/
-static init_module_fn *load_modules(TALLOC_CTX *mem_ctx, const char *path)
+static samba_init_module_fn *load_modules(TALLOC_CTX *mem_ctx, const char *path)
{
DIR *dir;
struct dirent *entry;
char *filename;
int success = 0;
- init_module_fn *ret = talloc_array(mem_ctx, init_module_fn, 2);
+ samba_init_module_fn *ret = talloc_array(mem_ctx, samba_init_module_fn, 2);
ret[0] = NULL;
@@ -106,7 +106,7 @@ static init_module_fn *load_modules(TALLOC_CTX *mem_ctx, const char *path)
ret[success] = load_module(filename, true, NULL);
if (ret[success]) {
- ret = talloc_realloc(mem_ctx, ret, init_module_fn, success+2);
+ ret = talloc_realloc(mem_ctx, ret, samba_init_module_fn, success+2);
success++;
ret[success] = NULL;
}
@@ -124,7 +124,7 @@ static init_module_fn *load_modules(TALLOC_CTX *mem_ctx, const char *path)
*
* @return true if all functions ran successfully, false otherwise
*/
-bool run_init_functions(init_module_fn *fns)
+bool run_init_functions(samba_init_module_fn *fns)
{
int i;
bool ret = true;
@@ -143,10 +143,10 @@ bool run_init_functions(init_module_fn *fns)
* Will return an array of function pointers to initialization functions
*/
-init_module_fn *load_samba_modules(TALLOC_CTX *mem_ctx, const char *subsystem)
+samba_init_module_fn *load_samba_modules(TALLOC_CTX *mem_ctx, const char *subsystem)
{
char *path = modules_path(mem_ctx, subsystem);
- init_module_fn *ret;
+ samba_init_module_fn *ret;
ret = load_modules(mem_ctx, path);
@@ -162,7 +162,7 @@ init_module_fn *load_samba_modules(TALLOC_CTX *mem_ctx, const char *subsystem)
static NTSTATUS do_smb_load_module(const char *module_name, bool is_probe)
{
void *handle;
- init_module_fn init;
+ samba_init_module_fn init;
NTSTATUS status;
init = load_module(module_name, is_probe, &handle);