diff options
author | Andrew Bartlett <abartlet@samba.org> | 2014-01-15 13:39:14 +1300 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-01-30 00:42:08 +0100 |
commit | 36c88ca9c194d49f51894bc00d3a1778d3800690 (patch) | |
tree | ee2f2dc0570d8fcb5efc94e765d718c5e021b084 /lib/param/loadparm.c | |
parent | 5c2aac0f8e52e097965d9e2aaeb305b28c0feef0 (diff) | |
download | samba-36c88ca9c194d49f51894bc00d3a1778d3800690.tar.gz samba-36c88ca9c194d49f51894bc00d3a1778d3800690.tar.xz samba-36c88ca9c194d49f51894bc00d3a1778d3800690.zip |
lib/param: Make lpcfg_print_parameter() common
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'lib/param/loadparm.c')
-rw-r--r-- | lib/param/loadparm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index ae9ee8f0fa..1349e47e65 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -1626,7 +1626,7 @@ bool lpcfg_set_option(struct loadparm_context *lp_ctx, const char *option) * Print a parameter of the specified type. */ -static void print_parameter(struct parm_struct *p, void *ptr, FILE * f) +void lpcfg_print_parameter(struct parm_struct *p, void *ptr, FILE * f) { /* For the seperation of lists values that we print below */ const char *list_sep = ", "; @@ -1844,7 +1844,7 @@ static void dump_globals(struct loadparm_context *lp_ctx, FILE *f, if (!show_defaults && (lp_ctx->flags[i] & FLAG_DEFAULT)) continue; fprintf(f, "\t%s = ", parm_table[i].label); - print_parameter(&parm_table[i], lpcfg_parm_ptr(lp_ctx, NULL, &parm_table[i]), f); + lpcfg_print_parameter(&parm_table[i], lpcfg_parm_ptr(lp_ctx, NULL, &parm_table[i]), f); fprintf(f, "\n"); } if (lp_ctx->globals->param_opt != NULL) { @@ -1896,7 +1896,7 @@ static void dump_a_service(struct loadparm_service * pService, struct loadparm_s } fprintf(f, "\t%s = ", parm_table[i].label); - print_parameter(&parm_table[i], + lpcfg_print_parameter(&parm_table[i], ((char *)pService) + parm_table[i].offset, f); fprintf(f, "\n"); } @@ -1926,7 +1926,7 @@ bool lpcfg_dump_a_parameter(struct loadparm_context *lp_ctx, ptr = lpcfg_parm_ptr(lp_ctx, service,parm); - print_parameter(parm, ptr, f); + lpcfg_print_parameter(parm, ptr, f); fprintf(f, "\n"); return true; } |