Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/libvirt_private.syms | 2 ++ src/locking/lock_manager.c | 32 ++++++++++++++++++++++++++++++++ src/locking/lock_manager.h | 9 +++++++++ 3 files changed, 43 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index be6ee19..72dda41 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1000,7 +1000,9 @@ virLockManagerPluginNew; virLockManagerPluginRef; virLockManagerPluginUnref; virLockManagerPluginUsesState; +virLockManagerRecallSeclabel; virLockManagerRelease; +virLockManagerRememberSeclabel; # nodeinfo.h diff --git a/src/locking/lock_manager.c b/src/locking/lock_manager.c index a002ea8..8fc82c8 100644 --- a/src/locking/lock_manager.c +++ b/src/locking/lock_manager.c @@ -397,3 +397,35 @@ int virLockManagerFree(virLockManagerPtr lock) return 0; } + +int virLockManagerRememberSeclabel(virLockManagerPtr lock, + const char *path, + const char *model, + const char *label) +{ + VIR_DEBUG("lock=%p path=%s model=%s label=%s", + lock, path, model, label); + + if (!lock) + return 0; + + CHECK_MANAGER(drvRemember, 0); + + return lock->driver->drvRemember(lock, path, model, label); +} + +int virLockManagerRecallSeclabel(virLockManagerPtr lock, + const char *path, + const char *model, + char **label) +{ + VIR_DEBUG("lock=%p path=%s model=%s label=%p", + lock, path, model, label); + + if (!lock) + return 0; + + CHECK_MANAGER(drvRecall, 0); + + return lock->driver->drvRecall(lock, path, model, label); +} diff --git a/src/locking/lock_manager.h b/src/locking/lock_manager.h index 4189759..4c2236f 100644 --- a/src/locking/lock_manager.h +++ b/src/locking/lock_manager.h @@ -67,4 +67,13 @@ int virLockManagerInquire(virLockManagerPtr manager, int virLockManagerFree(virLockManagerPtr manager); +int virLockManagerRememberSeclabel(virLockManagerPtr manager, + const char *path, + const char *model, + const char *label); +int virLockManagerRecallSeclabel(virLockManagerPtr manager, + const char *path, + const char *model, + char **label); + #endif /* __VIR_LOCK_MANAGER_H__ */ -- 2.4.9 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list