mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
s4-ldb: when -v is specified, show progress of ldbadd/ldbmodify
This is useful for speed tests with large numbers of records.
This commit is contained in:
parent
79a43fb743
commit
c99b310063
@ -35,6 +35,7 @@
|
||||
#include "tools/cmdline.h"
|
||||
|
||||
static int failures;
|
||||
static struct ldb_cmdline *options;
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
@ -69,6 +70,9 @@ static int process_file(struct ldb_context *ldb, FILE *f, int *count)
|
||||
failures++;
|
||||
} else {
|
||||
(*count)++;
|
||||
if (options->verbose) {
|
||||
printf("Added %s\n", ldb_dn_get_linearized(ldif->msg->dn));
|
||||
}
|
||||
}
|
||||
ldb_ldif_read_free(ldb, ldif);
|
||||
}
|
||||
@ -82,7 +86,6 @@ int main(int argc, const char **argv)
|
||||
{
|
||||
struct ldb_context *ldb;
|
||||
int i, ret=0, count=0;
|
||||
struct ldb_cmdline *options;
|
||||
|
||||
ldb = ldb_init(NULL, NULL);
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "tools/cmdline.h"
|
||||
|
||||
static int failures;
|
||||
static struct ldb_cmdline *options;
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
@ -71,6 +72,9 @@ static int process_file(struct ldb_context *ldb, FILE *f, int *count)
|
||||
failures++;
|
||||
} else {
|
||||
(*count)++;
|
||||
if (options->verbose) {
|
||||
printf("Modified %s\n", ldb_dn_get_linearized(ldif->msg->dn));
|
||||
}
|
||||
}
|
||||
ldb_ldif_read_free(ldb, ldif);
|
||||
}
|
||||
@ -83,7 +87,6 @@ int main(int argc, const char **argv)
|
||||
struct ldb_context *ldb;
|
||||
int count=0;
|
||||
int i, ret=LDB_SUCCESS;
|
||||
struct ldb_cmdline *options;
|
||||
|
||||
ldb = ldb_init(NULL, NULL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user