From 10bd56b34a51cb10f48646584d58f0fdffe85e94 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 2 Sep 2009 16:56:39 +1000 Subject: use ldb_cmdline_help() in ldbsearch --- source4/lib/ldb/tools/cmdline.h | 2 ++ source4/lib/ldb/tools/ldbsearch.c | 9 +-------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h index 45619ce496..4decf4588f 100644 --- a/source4/lib/ldb/tools/cmdline.h +++ b/source4/lib/ldb/tools/cmdline.h @@ -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); + diff --git a/source4/lib/ldb/tools/ldbsearch.c b/source4/lib/ldb/tools/ldbsearch.c index ba0a2a8927..8f7ee1ce38 100644 --- a/source4/lib/ldb/tools/ldbsearch.c +++ b/source4/lib/ldb/tools/ldbsearch.c @@ -38,14 +38,7 @@ static void usage(void) { printf("Usage: ldbsearch \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); } -- cgit