That's what dbwrap_wipe is for :-)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
return (result)?0:1;
}
-
-static int delete_fn(struct db_record *rec, void *priv)
-{
- dbwrap_record_delete(rec);
- return 0;
-}
-
/**
* dbwrap_tool_erase: erase the whole data base
* the keyname argument is not used.
const char *keyname,
const char *data)
{
- NTSTATUS status;
+ int ret;
- status = dbwrap_traverse(db, delete_fn, NULL, NULL);
+ ret = dbwrap_wipe(db);
- if (!NT_STATUS_IS_OK(status)) {
+ if (ret != 0) {
d_fprintf(stderr, "ERROR erasing the database\n");
return -1;
}