summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2008-06-05 23:22:19 +0200
committerKai Blin <kai@samba.org>2008-06-10 09:45:55 +0200
commit8efc535a4a5d02fe8e887d916213f1a0f0dda0af (patch)
tree5fc44356aac27bc5bb2a6e33fce4ded1a5d339fe /source3/utils
parent0f1b3ed5c0326cdca931adc43806ec4df0d3abf3 (diff)
downloadsamba-8efc535a4a5d02fe8e887d916213f1a0f0dda0af.tar.gz
samba-8efc535a4a5d02fe8e887d916213f1a0f0dda0af.tar.bz2
samba-8efc535a4a5d02fe8e887d916213f1a0f0dda0af.zip
net: Add net_display_usage_from_functable()
(This used to be commit de0e15b35ea46cfcdd82f45eb3329c44d7aacb90)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_proto.h1
-rw-r--r--source3/utils/net_util.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/source3/utils/net_proto.h b/source3/utils/net_proto.h
index 31ee584c4c..79ff8fed79 100644
--- a/source3/utils/net_proto.h
+++ b/source3/utils/net_proto.h
@@ -462,6 +462,7 @@ int net_run_function2(struct net_context *c, int argc, const char **argv,
const char *whoami, struct functable2 *table);
int net_run_function3(struct net_context *c, int argc, const char **argv,
const char *whoami, struct functable3 *table);
+void net_display_usage_from_functable(struct functable3 *table);
/* The following definitions come from utils/netlookup.c */
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c
index 826a2fb40f..695d285390 100644
--- a/source3/utils/net_util.c
+++ b/source3/utils/net_util.c
@@ -622,3 +622,10 @@ int net_run_function3(struct net_context *c, int argc, const char **argv,
return c->display_usage?0:-1;
}
+void net_display_usage_from_functable(struct functable3 *table)
+{
+ int i;
+ for (i=0; table[i].funcname != NULL; i++) {
+ d_printf("%s\n", table[i].usage);
+ }
+}