diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-11-01 18:45:25 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-11-01 18:55:20 +1100 |
commit | 6f2c4abadd6097d949b388cc4d9c4ebd77f0df10 (patch) | |
tree | 591f61a1a94fb7070065351a4f90987ea2d3e45d /source4/lib/ldb/tools/ldbrename.c | |
parent | f924a022cbc973ae646bff5119a1784e979a052f (diff) | |
download | samba-6f2c4abadd6097d949b388cc4d9c4ebd77f0df10.tar.gz samba-6f2c4abadd6097d949b388cc4d9c4ebd77f0df10.tar.bz2 samba-6f2c4abadd6097d949b388cc4d9c4ebd77f0df10.zip |
s4-ldb: convert existing ldb tools to use new command line hooks
the usage() function needs to take a ldb context, as the popt_options
is specific to the ldb context
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/lib/ldb/tools/ldbrename.c')
-rw-r--r-- | source4/lib/ldb/tools/ldbrename.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/ldb/tools/ldbrename.c b/source4/lib/ldb/tools/ldbrename.c index e0f258ce85..7473a77fda 100644 --- a/source4/lib/ldb/tools/ldbrename.c +++ b/source4/lib/ldb/tools/ldbrename.c @@ -36,11 +36,11 @@ #include "ldb.h" #include "tools/cmdline.h" -static void usage(void) +static void usage(struct ldb_context *ldb) { printf("Usage: ldbrename [<options>] <olddn> <newdn>\n"); printf("Renames records in a ldb\n\n"); - ldb_cmdline_help("ldbmodify", stdout); + ldb_cmdline_help(ldb, "ldbmodify", stdout); exit(1); } @@ -58,7 +58,7 @@ int main(int argc, const char **argv) options = ldb_cmdline_process(ldb, argc, argv, usage); if (options->argc < 2) { - usage(); + usage(ldb); } dn1 = ldb_dn_new(ldb, ldb, options->argv[0]); |