[PATCH 01/22] conf: Implement virStorageVolType enum helper functions

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

 



Add support for string conversion from and to the virStorageVolType
enum.
---
 src/conf/storage_conf.c  | 4 ++++
 src/conf/storage_conf.h  | 2 ++
 src/libvirt_private.syms | 2 ++
 3 files changed, 8 insertions(+)

diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 8b378c2..1355056 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -99,6 +99,10 @@ VIR_ENUM_IMPL(virStoragePoolAuthType,
               VIR_STORAGE_POOL_AUTH_LAST,
               "none", "chap", "ceph")

+VIR_ENUM_IMPL(virStorageVol,
+              VIR_STORAGE_VOL_LAST,
+              "file", "block", "dir", "network");
+
 typedef const char *(*virStorageVolFormatToString)(int format);
 typedef int (*virStorageVolFormatFromString)(const char *format);
 typedef const char *(*virStorageVolFeatureToString)(int feature);
diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h
index f062bd8..9897c97 100644
--- a/src/conf/storage_conf.h
+++ b/src/conf/storage_conf.h
@@ -550,6 +550,8 @@ enum virStoragePartedFsType {
 };
 VIR_ENUM_DECL(virStoragePartedFsType)

+VIR_ENUM_DECL(virStorageVol);
+
 # define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE   \
                 (VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE | \
                  VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index a705c56..205fe56 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -701,6 +701,8 @@ virStorageVolDefFree;
 virStorageVolDefParseFile;
 virStorageVolDefParseNode;
 virStorageVolDefParseString;
+virStorageVolTypeFromString;
+virStorageVolTypeToString;


 # conf/storage_encryption_conf.h
-- 
1.8.4.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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]