summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-10-25 07:43:06 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-10-28 13:10:28 +0200
commit1b7cc4ac7c793d4c1829d842c84273ef2d081fdb (patch)
treea4a55a7a41621f9927c7c842cc5b37dbf53b3bbf /lib
parent87354c9a6de95d5dcebace77a35fc21a73d599ab (diff)
downloadsamba-1b7cc4ac7c793d4c1829d842c84273ef2d081fdb.tar.gz
samba-1b7cc4ac7c793d4c1829d842c84273ef2d081fdb.tar.bz2
samba-1b7cc4ac7c793d4c1829d842c84273ef2d081fdb.zip
lib/util Rename samba_init_module_fn -> samba_module_init_fn
This is to provide a cleaner namespace in the public samba plugin functions. Andrew Bartlett
Diffstat (limited to 'lib')
-rw-r--r--lib/util/internal_module.c14
-rw-r--r--lib/util/internal_module.h4
-rw-r--r--lib/util/samba_module.c6
-rw-r--r--lib/util/samba_module.h6
4 files changed, 15 insertions, 15 deletions
diff --git a/lib/util/internal_module.c b/lib/util/internal_module.c
index 04c02f0760..b5156fd9e2 100644
--- a/lib/util/internal_module.c
+++ b/lib/util/internal_module.c
@@ -28,7 +28,7 @@
/**
* Obtain the init function from a shared library file
*/
-samba_init_module_fn load_module(const char *path, bool is_probe, void **handle_out)
+samba_module_init_fn load_module(const char *path, bool is_probe, void **handle_out)
{
void *handle;
void *init_fn;
@@ -57,7 +57,7 @@ samba_init_module_fn load_module(const char *path, bool is_probe, void **handle_
return NULL;
}
- init_fn = (samba_init_module_fn)dlsym(handle, SAMBA_INIT_MODULE);
+ init_fn = (samba_module_init_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 @@ samba_init_module_fn load_module(const char *path, bool is_probe, void **handle_
*handle_out = handle;
}
- return (samba_init_module_fn)init_fn;
+ return (samba_module_init_fn)init_fn;
}
/**
* Obtain list of init functions from the modules in the specified
* directory
*/
-samba_init_module_fn *load_modules(TALLOC_CTX *mem_ctx, const char *path)
+samba_module_init_fn *load_modules(TALLOC_CTX *mem_ctx, const char *path)
{
DIR *dir;
struct dirent *entry;
char *filename;
int success = 0;
- samba_init_module_fn *ret = talloc_array(mem_ctx, samba_init_module_fn, 2);
+ samba_module_init_fn *ret = talloc_array(mem_ctx, samba_module_init_fn, 2);
ret[0] = NULL;
@@ -106,7 +106,7 @@ samba_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, samba_init_module_fn, success+2);
+ ret = talloc_realloc(mem_ctx, ret, samba_module_init_fn, success+2);
success++;
ret[success] = NULL;
}
@@ -125,7 +125,7 @@ samba_init_module_fn *load_modules(TALLOC_CTX *mem_ctx, const char *path)
static NTSTATUS do_smb_load_module(const char *module_name, bool is_probe)
{
void *handle;
- samba_init_module_fn init;
+ samba_module_init_fn init;
NTSTATUS status;
init = load_module(module_name, is_probe, &handle);
diff --git a/lib/util/internal_module.h b/lib/util/internal_module.h
index 7d1acc52a3..9cbddeae03 100644
--- a/lib/util/internal_module.h
+++ b/lib/util/internal_module.h
@@ -28,7 +28,7 @@
*
* The handle to dlclose() in case of error is returns in *handle if handle is not NULL
*/
-samba_init_module_fn load_module(const char *path, bool is_probe, void **handle);
+samba_module_init_fn load_module(const char *path, bool is_probe, void **handle);
int smb_load_modules(const char **modules);
NTSTATUS smb_probe_module(const char *subsystem, const char *module);
@@ -37,6 +37,6 @@ NTSTATUS smb_probe_module(const char *subsystem, const char *module);
* Obtain list of init functions from the modules in the specified
* directory
*/
-samba_init_module_fn *load_modules(TALLOC_CTX *mem_ctx, const char *path);
+samba_module_init_fn *load_modules(TALLOC_CTX *mem_ctx, const char *path);
#endif /* _INTERNAL_MODULES_H */
diff --git a/lib/util/samba_module.c b/lib/util/samba_module.c
index f555eea8b6..fd3da7552e 100644
--- a/lib/util/samba_module.c
+++ b/lib/util/samba_module.c
@@ -30,7 +30,7 @@
*
* @return true if all functions ran successfully, false otherwise
*/
-bool samba_init_module_fns_run(samba_init_module_fn *fns)
+bool samba_init_module_fns_run(samba_module_init_fn *fns)
{
int i;
bool ret = true;
@@ -49,10 +49,10 @@ bool samba_init_module_fns_run(samba_init_module_fn *fns)
* Will return an array of function pointers to initialization functions
*/
-samba_init_module_fn *samba_modules_load(TALLOC_CTX *mem_ctx, const char *subsystem)
+samba_module_init_fn *samba_modules_load(TALLOC_CTX *mem_ctx, const char *subsystem)
{
char *path = modules_path(mem_ctx, subsystem);
- samba_init_module_fn *ret;
+ samba_module_init_fn *ret;
ret = load_modules(mem_ctx, path);
diff --git a/lib/util/samba_module.h b/lib/util/samba_module.h
index 32b5c4b6ad..0bdf35fa10 100644
--- a/lib/util/samba_module.h
+++ b/lib/util/samba_module.h
@@ -22,7 +22,7 @@
#define _SAMBA_MODULES_H
/* Module support */
-typedef NTSTATUS (*samba_init_module_fn) (void);
+typedef NTSTATUS (*samba_module_init_fn) (void);
NTSTATUS samba_init_module(void);
@@ -37,13 +37,13 @@ NTSTATUS samba_init_module(void);
*
* @return true if all functions ran successfully, false otherwise
*/
-bool samba_init_module_fns_run(samba_init_module_fn *fns);
+bool samba_module_init_fns_run(samba_module_init_fn *fns);
/**
* Load the initialization functions from DSO files for a specific subsystem.
*
* Will return an array of function pointers to initialization functions
*/
-samba_init_module_fn *samba_modules_load(TALLOC_CTX *mem_ctx, const char *subsystem);
+samba_module_init_fn *samba_modules_load(TALLOC_CTX *mem_ctx, const char *subsystem);
#endif /* _SAMBA_MODULES_H */