diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/net_proto.h | 1 | ||||
-rw-r--r-- | source3/utils/net_util.c | 7 |
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); + } +} |