]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: storage_source: Introduce virStorageSourceIsFD
authorPeter Krempa <pkrempa@redhat.com>
Thu, 5 Jan 2023 11:53:19 +0000 (12:53 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 9 Jan 2023 13:59:43 +0000 (14:59 +0100)
The helper will be used in various places that need to check that a disk
source struct is using FD passing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/conf/storage_source_conf.c
src/conf/storage_source_conf.h
src/libvirt_private.syms

index 4b1df19ab43b6ce8a461f8e673bddfe129e9a903..8b67e511e2d6377b88e58d27bde74f07ec555eb5 100644 (file)
@@ -1057,6 +1057,13 @@ virStorageSourceIsLocalStorage(const virStorageSource *src)
 }
 
 
+bool
+virStorageSourceIsFD(const virStorageSource *src)
+{
+    return src->fdgroup;
+}
+
+
 /**
  * virStorageSourceIsEmpty:
  *
index ef82104e6c6b0ecc3d053f93921d0c7dc74cdfb2..9c07eef200d868988ae20f740a3d07de5eb98805 100644 (file)
@@ -494,6 +494,9 @@ virStorageSourceGetActualType(const virStorageSource *def);
 bool
 virStorageSourceIsLocalStorage(const virStorageSource *src);
 
+bool
+virStorageSourceIsFD(const virStorageSource *src);
+
 bool
 virStorageSourceIsEmpty(virStorageSource *src);
 
index c3fff7fc2a20188d490b9eb7f2983b5e2a904964..568480aca5efaa74e82fd3ce71c935f7535a6d57 100644 (file)
@@ -1129,6 +1129,7 @@ virStorageSourceInitiatorParseXML;
 virStorageSourceIsBacking;
 virStorageSourceIsBlockLocal;
 virStorageSourceIsEmpty;
+virStorageSourceIsFD;
 virStorageSourceIsLocalStorage;
 virStorageSourceIsRelative;
 virStorageSourceIsSameLocation;