static int delete_fn(struct db_record *rec, void *priv)
{
- rec->delete_rec(rec);
+ dbwrap_record_delete(rec);
return 0;
}
const char *keyname,
void *data)
{
- int ret;
+ NTSTATUS status;
- ret = db->traverse(db, delete_fn, NULL);
+ status = dbwrap_traverse(db, delete_fn, NULL, NULL);
- if (ret < 0) {
+ if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, "ERROR erasing the database\n");
return -1;
}
static int listkey_fn(struct db_record *rec, void *private_data)
{
- int length = rec->key.dsize;
- unsigned char *p = (unsigned char *)rec->key.dptr;
+ int length = dbwrap_record_get_key(rec).dsize;
+ unsigned char *p = (unsigned char *)dbwrap_record_get_key(rec).dptr;
while (length--) {
if (isprint(*p) && !strchr("\"\\", *p)) {
const char *keyname,
void *data)
{
- int ret;
+ NTSTATUS status;
- ret = db->traverse_read(db, listkey_fn, NULL);
+ status = dbwrap_traverse_read(db, listkey_fn, NULL, NULL);
- if (ret < 0) {
+ if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, "ERROR listing db keys\n");
return -1;
}