This will be used later on in the test suite.
---
src/libvirt_private.syms | 1 +
src/util/vircommand.c | 9 +++++++++
src/util/vircommand.h | 2 ++
3 files changed, 12 insertions(+)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index a1c7624..a978d61 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1433,6 +1433,7 @@ virCommandDaemonize;
virCommandDoAsyncIO;
virCommandExec;
virCommandFree;
+virCommandGetMaxMemLock;
virCommandHandshakeNotify;
virCommandHandshakeWait;
virCommandNew;
diff --git a/src/util/vircommand.c b/src/util/vircommand.c
index e1bbc05..af97049 100644
--- a/src/util/vircommand.c
+++ b/src/util/vircommand.c
@@ -1083,6 +1083,15 @@ virCommandSetUID(virCommandPtr cmd, uid_t uid)
cmd->uid = uid;
}
+unsigned long long
+virCommandGetMaxMemLock(virCommandPtr cmd)
+{
+ if (!cmd || cmd->has_error)
+ return 0;
+
+ return cmd->maxMemLock;
+}
+
void
virCommandSetMaxMemLock(virCommandPtr cmd, unsigned long long bytes)
{
diff --git a/src/util/vircommand.h b/src/util/vircommand.h
index 99dcdeb..0fb4c8d 100644
--- a/src/util/vircommand.h
+++ b/src/util/vircommand.h
@@ -72,6 +72,8 @@ void virCommandSetGID(virCommandPtr cmd, gid_t gid);
void virCommandSetUID(virCommandPtr cmd, uid_t uid);
+unsigned long long virCommandGetMaxMemLock(virCommandPtr cmd);
+
void virCommandSetMaxMemLock(virCommandPtr cmd, unsigned long long bytes);
void virCommandSetMaxProcesses(virCommandPtr cmd, unsigned int procs);
void virCommandSetMaxFiles(virCommandPtr cmd, unsigned int files);
--
2.7.4