summaryrefslogtreecommitdiff
path: root/source3/utils/net_conf.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-15 20:52:17 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-15 20:52:17 +0200
commitd0b946e328c25b8e2bdfef58e11bc3badad97f1c (patch)
treeca63d963f6db36f935aa591500db9741db4d58b8 /source3/utils/net_conf.c
parent28fd4f6fcb101fc0274c43611a59d22072fb7891 (diff)
parentb64be89a6ddd1b9c62df98801f34f4d9116a06bf (diff)
downloadsamba-d0b946e328c25b8e2bdfef58e11bc3badad97f1c.tar.gz
samba-d0b946e328c25b8e2bdfef58e11bc3badad97f1c.tar.bz2
samba-d0b946e328c25b8e2bdfef58e11bc3badad97f1c.zip
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into 3-2-nopipeindex
(This used to be commit 9028f9e065536594df901ae4aac900102f2d85f6)
Diffstat (limited to 'source3/utils/net_conf.c')
-rw-r--r--source3/utils/net_conf.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index 88cc15e0eb..4fffcf8a8c 100644
--- a/source3/utils/net_conf.c
+++ b/source3/utils/net_conf.c
@@ -150,9 +150,13 @@ static WERROR import_process_service(struct smbconf_ctx *conf_ctx,
TALLOC_CTX *mem_ctx = talloc_stackframe();
if (opt_testmode) {
- d_printf("[%s]\n", servicename);
- for (idx = 0; idx < num_params; idx ++) {
- d_printf("\t%s = %s\n", param_names[idx],
+ const char *indent = "";
+ if (servicename != NULL) {
+ d_printf("[%s]\n", servicename);
+ indent = "\t";
+ }
+ for (idx = 0; idx < num_params; idx++) {
+ d_printf("%s%s = %s\n", indent, param_names[idx],
param_values[idx]);
}
d_printf("\n");
@@ -242,11 +246,16 @@ static int net_conf_list(struct smbconf_ctx *conf_ctx,
}
for (share_count = 0; share_count < num_shares; share_count++) {
- d_printf("[%s]\n", share_names[share_count]);
+ const char *indent = "";
+ if (share_names[share_count] != NULL) {
+ d_printf("[%s]\n", share_names[share_count]);
+ indent = "\t";
+ }
for (param_count = 0; param_count < num_params[share_count];
param_count++)
{
- d_printf("\t%s = %s\n",
+ d_printf("%s%s = %s\n",
+ indent,
param_names[share_count][param_count],
param_values[share_count][param_count]);
}