mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-31 00:45:18 +00:00
nodedev: add persistence to virNodeDeviceObj
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@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
066c13de66
commit
d4375403ff
@ -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;
|
||||
}
|
||||
|
@ -128,3 +128,9 @@ virNodeDeviceObjIsActive(virNodeDeviceObj *obj);
|
||||
void
|
||||
virNodeDeviceObjSetActive(virNodeDeviceObj *obj,
|
||||
bool active);
|
||||
bool
|
||||
virNodeDeviceObjIsPersistent(virNodeDeviceObj *obj);
|
||||
|
||||
void
|
||||
virNodeDeviceObjSetPersistent(virNodeDeviceObj *obj,
|
||||
bool persistent);
|
||||
|
@ -1273,6 +1273,7 @@ virNetworkPortDefSaveStatus;
|
||||
virNodeDeviceObjEndAPI;
|
||||
virNodeDeviceObjGetDef;
|
||||
virNodeDeviceObjIsActive;
|
||||
virNodeDeviceObjIsPersistent;
|
||||
virNodeDeviceObjListAssignDef;
|
||||
virNodeDeviceObjListExport;
|
||||
virNodeDeviceObjListFindByName;
|
||||
@ -1286,6 +1287,7 @@ virNodeDeviceObjListNew;
|
||||
virNodeDeviceObjListNumOfDevices;
|
||||
virNodeDeviceObjListRemove;
|
||||
virNodeDeviceObjSetActive;
|
||||
virNodeDeviceObjSetPersistent;
|
||||
|
||||
|
||||
# conf/virnwfilterbindingdef.h
|
||||
|
Loading…
x
Reference in New Issue
Block a user