Co-authored-by: Wei Liu <liuwe@microsoft.com>
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
#pragma once
#include "virdomainobjlist.h"
+#include "virhostdev.h"
#include "virthread.h"
#include "ch_capabilities.h"
#include "virebtables.h"
/* Immutable pointer, lockless APIs. Pointless abstraction */
ebtablesContext *ebtables;
+
+ /* Immutable pointer to host device manager */
+ virHostdevManager *hostdevMgr;
};
#define CH_SAVE_MAGIC "libvirt-xml\n \0 \r"
virObjectUnref(ch_driver->xmlopt);
virObjectUnref(ch_driver->caps);
virObjectUnref(ch_driver->domains);
+ virObjectUnref(ch_driver->hostdevMgr);
virMutexDestroy(&ch_driver->lock);
g_clear_pointer(&ch_driver, g_free);
if (!(ch_driver->config = virCHDriverConfigNew(privileged)))
goto cleanup;
+ if (!(ch_driver->hostdevMgr = virHostdevManagerGetDefault()))
+ goto cleanup;
+
if ((rv = chExtractVersion(ch_driver)) < 0) {
if (rv == -2)
ret = VIR_DRV_STATE_INIT_SKIPPED;