1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

param: use lpcfg_dump_globals in s3 loadparm

Change-Id: I7f7f5238a47e0c3634757b74f3f852ce36988614
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Garming Sam 2014-03-27 08:51:56 +13:00 committed by Michael Adam
parent 6f9a0b8135
commit 26a6f05f0f
2 changed files with 13 additions and 2 deletions

View File

@ -2030,7 +2030,7 @@ bool is_default(void *base_structure, int i)
*Display the contents of the global structure.
*/
static void lpcfg_dump_globals(struct loadparm_context *lp_ctx, FILE *f,
void lpcfg_dump_globals(struct loadparm_context *lp_ctx, FILE *f,
bool show_defaults)
{
int i;

View File

@ -4064,11 +4064,22 @@ Display the contents of the services array in human-readable form.
void lp_dump(FILE *f, bool show_defaults, int maxtoprint)
{
int iService;
struct loadparm_context *lp_ctx;
if (show_defaults)
defaults_saved = false;
dump_globals(f, defaults_saved);
lp_ctx = loadparm_init_s3(talloc_tos(),
loadparm_s3_helpers());
if (lp_ctx == NULL) {
DEBUG(0, ("loadparm_init_s3 failed\n"));
return;
}
lp_ctx->sDefault = &sDefault;
lp_ctx->services = ServicePtrs;
lpcfg_dump_globals(lp_ctx, f, !defaults_saved);
lpcfg_dump_a_service(&sDefault, &sDefault, f, flags_list, show_defaults);