Re: [PATCH v3 3/5] test: Implement virNodeDeviceIsPersistent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx>

On 4/9/24 16:56, Cole Robinson wrote:
Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
---
  src/test/test_driver.c | 16 ++++++++++++++++
  1 file changed, 16 insertions(+)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index f9bd6f4e67..41828f86b6 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -7794,6 +7794,21 @@ testNodeDeviceIsActive(virNodeDevicePtr dev)
      return ret;
  }
+static int
+testNodeDeviceIsPersistent(virNodeDevicePtr dev)
+{
+    testDriver *privconn = dev->conn->privateData;
+    virNodeDeviceObj *obj = NULL;
+    int ret = -1;
+
+    if (!(obj = testNodeDeviceObjFindByName(privconn, dev->name)))
+        return -1;
+
+    ret = virNodeDeviceObjIsPersistent(obj);
+    virNodeDeviceObjEndAPI(&obj);
+    return ret;
+}
+
/* Domain event implementations */
  static int
@@ -10673,6 +10688,7 @@ static virNodeDeviceDriver testNodeDeviceDriver = {
      .nodeDeviceCreateXML = testNodeDeviceCreateXML, /* 0.7.3 */
      .nodeDeviceDestroy = testNodeDeviceDestroy, /* 0.7.3 */
      .nodeDeviceIsActive = testNodeDeviceIsActive, /* 10.3.0 */
+    .nodeDeviceIsPersistent = testNodeDeviceIsPersistent, /* 10.3.0 */
  };
static virConnectDriver testConnectDriver = {

--
Mit freundlichen Grüßen/Kind regards
   Boris Fiuczynski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux