summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-02-11 14:59:08 +0000
committerGerald Carter <jerry@samba.org>2004-02-11 14:59:08 +0000
commit439bcaf9e716c3a22ec436abc0cce33d9ad3439b (patch)
treed56030bff92cee10b1ec44afe09e22eb20ecfd8c /source3/utils
parent00e0a5ca901b8a98da5958692fb2225165eed549 (diff)
downloadsamba-439bcaf9e716c3a22ec436abc0cce33d9ad3439b.tar.gz
samba-439bcaf9e716c3a22ec436abc0cce33d9ad3439b.tar.bz2
samba-439bcaf9e716c3a22ec436abc0cce33d9ad3439b.zip
BUG 1055; patch from SATOH Fumiyasu <fumiya@miraclelinux.com>; formatting fixes for 'net share'
(This used to be commit 44db163b3001d8dc50b64bac7fd12be1147e14b7)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rap.c7
-rw-r--r--source3/utils/net_rpc.c4
2 files changed, 6 insertions, 5 deletions
diff --git a/source3/utils/net_rap.c b/source3/utils/net_rap.c
index 1f6c6e7a84..39254641ab 100644
--- a/source3/utils/net_rap.c
+++ b/source3/utils/net_rap.c
@@ -153,14 +153,14 @@ int net_rap_share_usage(int argc, const char **argv)
static void long_share_fn(const char *share_name, uint32 type,
const char *comment, void *state)
{
- d_printf("%-12.12s %-8.8s %-50.50s\n",
+ d_printf("%-12s %-8.8s %-50s\n",
share_name, share_type[type], comment);
}
static void share_fn(const char *share_name, uint32 type,
const char *comment, void *state)
{
- d_printf("%-12.12s\n", share_name);
+ d_printf("%s\n", share_name);
}
static int rap_share_delete(int argc, const char **argv)
@@ -240,8 +240,9 @@ int net_rap_share(int argc, const char **argv)
"\nShare name Type Description\n"\
"---------- ---- -----------\n");
ret = cli_RNetShareEnum(cli, long_share_fn, NULL);
+ } else {
+ ret = cli_RNetShareEnum(cli, share_fn, NULL);
}
- ret = cli_RNetShareEnum(cli, share_fn, NULL);
cli_shutdown(cli);
return ret;
}
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 30da32ae4e..b92d7ec81e 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -1623,10 +1623,10 @@ static void display_share_info_1(SRV_SHARE_INFO_1 *info1)
rpcstr_pull_unistr2_fstring(remark, &info1->info_1_str.uni_remark);
if (opt_long_list_entries) {
- d_printf("%-12.12s %-8.8s %-50.50s\n",
+ d_printf("%-12s %-8.8s %-50s\n",
netname, share_type[info1->info_1.type], remark);
} else {
- d_printf("%-12.12s\n", netname);
+ d_printf("%s\n", netname);
}
}