summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-04-15 17:36:44 +0200
committerMichael Adam <obnox@samba.org>2008-04-15 17:40:27 +0200
commited85ea4248688005d1769894f0b2f2e86d822fde (patch)
tree2dee22cef2de5fd443fe9e6f16d09c8fb6f6a8a5 /source3/utils
parent770b1923dc7735c2681c9976201569896feb74d9 (diff)
downloadsamba-ed85ea4248688005d1769894f0b2f2e86d822fde.tar.gz
samba-ed85ea4248688005d1769894f0b2f2e86d822fde.tar.bz2
samba-ed85ea4248688005d1769894f0b2f2e86d822fde.zip
net conf: adapt output of NULL share params in net conf list.
don't list NULL share name and don't indent these parameters Michael (This used to be commit 0212b38913945ce3c8b14734804d81f1cd315621)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_conf.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index 293485aab1..4fffcf8a8c 100644
--- a/source3/utils/net_conf.c
+++ b/source3/utils/net_conf.c
@@ -246,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]);
}