mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
tdb/test: add UNMAP command to external-agent.c
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
1e74ba47da
commit
1672643e44
@ -90,6 +90,12 @@ static enum agent_return do_operation(enum operation op, const char *name)
|
||||
case PING:
|
||||
ret = SUCCESS;
|
||||
break;
|
||||
case UNMAP:
|
||||
ret = tdb_munmap(tdb) == 0 ? SUCCESS : OTHER_FAILURE;
|
||||
if (ret == SUCCESS) {
|
||||
tdb->flags |= TDB_NOMMAP;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ret = OTHER_FAILURE;
|
||||
}
|
||||
@ -211,6 +217,7 @@ const char *operation_name(enum operation op)
|
||||
case NEEDS_RECOVERY: return "NEEDS_RECOVERY";
|
||||
case CLOSE: return "CLOSE";
|
||||
case PING: return "PING";
|
||||
case UNMAP: return "UNMAP";
|
||||
}
|
||||
return "**INVALID**";
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ enum operation {
|
||||
NEEDS_RECOVERY,
|
||||
CLOSE,
|
||||
PING,
|
||||
UNMAP,
|
||||
};
|
||||
|
||||
/* Do this before doing any tdb stuff. Return handle, or -1. */
|
||||
|
Loading…
Reference in New Issue
Block a user