Consistent with other objects (e.g. virDomainObj), add a field to
indicate whether the node device is persistent or transient.
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
src/conf/virnodedeviceobj.c | 16 ++++++++++++++++
src/conf/virnodedeviceobj.h | 6 ++++++
src/libvirt_private.syms | 2 ++
3 files changed, 24 insertions(+)
diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c
index ab663fd5a0..ce84e4d8c1 100644
--- a/src/conf/virnodedeviceobj.c
+++ b/src/conf/virnodedeviceobj.c
@@ -40,6 +40,7 @@ struct _virNodeDeviceObj {
bool skipUpdateCaps; /* whether to skip checking host caps,
used by testdriver */
bool active;
+ bool persistent;
};
struct _virNodeDeviceObjList {
@@ -1003,3 +1004,18 @@ virNodeDeviceObjSetActive(virNodeDeviceObj *obj,
{
obj->active = active;
}
+
+
+bool
+virNodeDeviceObjIsPersistent(virNodeDeviceObj *obj)
+{
+ return obj->persistent;
+}
+
+
+void
+virNodeDeviceObjSetPersistent(virNodeDeviceObj *obj,
+ bool persistent)
+{
+ obj->persistent = persistent;
+}
diff --git a/src/conf/virnodedeviceobj.h b/src/conf/virnodedeviceobj.h
index e786a70f51..7f682b9dca 100644
--- a/src/conf/virnodedeviceobj.h
+++ b/src/conf/virnodedeviceobj.h
@@ -128,3 +128,9 @@ virNodeDeviceObjIsActive(virNodeDeviceObj *obj);
void
virNodeDeviceObjSetActive(virNodeDeviceObj *obj,
bool active);
+bool
+virNodeDeviceObjIsPersistent(virNodeDeviceObj *obj);
+
+void
+virNodeDeviceObjSetPersistent(virNodeDeviceObj *obj,
+ bool persistent);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 09957c943b..047314ec19 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1273,6 +1273,7 @@ virNetworkPortDefSaveStatus;
virNodeDeviceObjEndAPI;
virNodeDeviceObjGetDef;
virNodeDeviceObjIsActive;
+virNodeDeviceObjIsPersistent;
virNodeDeviceObjListAssignDef;
virNodeDeviceObjListExport;
virNodeDeviceObjListFindByName;
@@ -1286,6 +1287,7 @@ virNodeDeviceObjListNew;
virNodeDeviceObjListNumOfDevices;
virNodeDeviceObjListRemove;
virNodeDeviceObjSetActive;
+virNodeDeviceObjSetPersistent;
# conf/virnwfilterbindingdef.h
--
2.26.3