use ldb_cmdline_help() in ldbsearch
authorAndrew Tridgell <tridge@samba.org>
Wed, 2 Sep 2009 06:56:39 +0000 (16:56 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 2 Sep 2009 08:19:55 +0000 (18:19 +1000)
source4/lib/ldb/tools/cmdline.h
source4/lib/ldb/tools/ldbsearch.c

index 45619ce496a7c8164bc35b0e4b8717d492e138f6..4decf4588f8566d39957f02c47aba8a88748bcb3 100644 (file)
@@ -51,3 +51,5 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const
 
 
 int handle_controls_reply(struct ldb_control **reply, struct ldb_control **request);
+void ldb_cmdline_help(const char *cmdname, FILE *f);
+
index ba0a2a892711dd3ee7889c28237c77dcbc4e2304..8f7ee1ce382fdf52d2980fb88afcb66b667eccf0 100644 (file)
 static void usage(void)
 {
        printf("Usage: ldbsearch <options> <expression> <attrs...>\n");
-       printf("Options:\n");
-       printf("  -H ldb_url       choose the database (or $LDB_URL)\n");
-       printf("  -s base|sub|one  choose search scope\n");
-       printf("  -b basedn        choose baseDN\n");
-       printf("  -i               read search expressions from stdin\n");
-        printf("  -S               sort returned attributes\n");
-       printf("  -o options       pass options like modules to activate\n");
-       printf("              e.g: -o modules:timestamps\n");
+       ldb_cmdline_help("ldbsearch", stdout);
        exit(1);
 }