summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2008-05-14 15:09:29 +0200
committerKai Blin <kai@samba.org>2008-05-20 14:28:07 +0200
commit89cd35d0549eeee1c31d976b86cf4fd45a664c8a (patch)
tree5bdc900a2c662b08634513a1fdbd53525dcd0537 /source3
parent1634bd92eac7dcb2c6056c862a7a8c18f6bc8d1b (diff)
downloadsamba-89cd35d0549eeee1c31d976b86cf4fd45a664c8a.tar.gz
samba-89cd35d0549eeee1c31d976b86cf4fd45a664c8a.tar.bz2
samba-89cd35d0549eeee1c31d976b86cf4fd45a664c8a.zip
net: Move help for "net status" to net_status.c
(This used to be commit d26681b169a533f838f74d48af072b57afc9f8df)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_help.c9
-rw-r--r--source3/utils/net_proto.h2
-rw-r--r--source3/utils/net_status.c16
3 files changed, 14 insertions, 13 deletions
diff --git a/source3/utils/net_help.c b/source3/utils/net_help.c
index 51dc1a0c51..6138a1e511 100644
--- a/source3/utils/net_help.c
+++ b/source3/utils/net_help.c
@@ -33,15 +33,6 @@ static int help_usage(struct net_context *c, int argc, const char **argv)
return -1;
}
-int net_help_status(struct net_context *c, int argc, const char **argv)
-{
- d_printf(" net status sessions [parseable] "
- "Show list of open sessions\n");
- d_printf(" net status shares [parseable] "
- "Show list of open shares\n");
- return -1;
-}
-
static int net_usage(struct net_context *c, int argc, const char **argv)
{
d_printf(" net time\t\tto view or set time information\n"\
diff --git a/source3/utils/net_proto.h b/source3/utils/net_proto.h
index d429aa7ee2..6d6700aa50 100644
--- a/source3/utils/net_proto.h
+++ b/source3/utils/net_proto.h
@@ -117,7 +117,6 @@ int net_groupmap(struct net_context *c, int argc, const char **argv);
/* The following definitions come from utils/net_help.c */
-int net_help_status(struct net_context *c, int argc, const char **argv);
int net_help(struct net_context *c, int argc, const char **argv);
/* The following definitions come from utils/net_idmap.c */
@@ -409,6 +408,7 @@ int net_share(struct net_context *c, int argc, const char **argv);
/* The following definitions come from utils/net_status.c */
+int net_status_usage(struct net_context *c, int argc, const char **argv);
int net_status(struct net_context *c, int argc, const char **argv);
/* The following definitions come from utils/net_time.c */
diff --git a/source3/utils/net_status.c b/source3/utils/net_status.c
index 121577f165..2835b2084d 100644
--- a/source3/utils/net_status.c
+++ b/source3/utils/net_status.c
@@ -19,6 +19,15 @@
#include "includes.h"
#include "utils/net.h"
+int net_status_usage(struct net_context *c, int argc, const char **argv)
+{
+ d_printf(" net status sessions [parseable] "
+ "Show list of open sessions\n");
+ d_printf(" net status shares [parseable] "
+ "Show list of open shares\n");
+ return -1;
+}
+
static int show_session(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf,
void *state)
{
@@ -59,7 +68,7 @@ static int net_status_sessions(struct net_context *c, int argc, const char **arg
} else if ((argc == 1) && strequal(argv[0], "parseable")) {
parseable = true;
} else {
- return net_help_status(c, argc, argv);
+ return net_status_usage(c, argc, argv);
}
if (!parseable) {
@@ -209,7 +218,7 @@ static int net_status_shares(struct net_context *c, int argc, const char **argv)
}
if ((argc != 1) || !strequal(argv[0], "parseable")) {
- return net_help_status(c, argc, argv);
+ return net_status_usage(c, argc, argv);
}
return net_status_shares_parseable(c, argc, argv);
@@ -220,7 +229,8 @@ int net_status(struct net_context *c, int argc, const char **argv)
struct functable func[] = {
{"sessions", net_status_sessions},
{"shares", net_status_shares},
+ {"help", net_status_usage},
{NULL, NULL}
};
- return net_run_function(c, argc, argv, func, net_help_status);
+ return net_run_function(c, argc, argv, func, net_status_usage);
}