[PATCH 2/5] s4: make net help foo work and use net_run_usage
Matthieu Patou
mat at matws.net
Fri Jan 8 09:38:21 MST 2010
---
source4/utils/net/net.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/source4/utils/net/net.c b/source4/utils/net/net.c
index 9119273..fc34e84 100644
--- a/source4/utils/net/net.c
+++ b/source4/utils/net/net.c
@@ -141,8 +141,12 @@ int net_run_function(struct net_context *ctx,
if (argc == 0) {
return usage_fn(ctx, argc, argv);
- } else if (argc == 1 && strequal(argv[0], "help")) {
- return net_help(ctx, functable);
+ } else if (strequal(argv[0], "help")) {
+ if( argc == 1 ) {
+ return net_help(ctx, functable);
+ } else {
+ return net_run_usage(ctx,argc-1,argv+1,functable);
+ }
}
for (i=0; functable[i].name; i++) {
--
1.6.3.3
--------------050508060406060009090606
Content-Type: text/x-patch;
name="0001-s4-Uniformise-net-help-output-between-python-and-bui.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0001-s4-Uniformise-net-help-output-between-python-and-bui.pa";
filename*1="tch"
More information about the samba-technical
mailing list