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

[libvirt] [PATCH 1/6] conf: Move virDomainDeviceAddressType to device_conf



It's used in virDomainDeviceInfo, which makes
domain_conf the wrong place to declare it.

Signed-off-by: Andrea Bolognani <abologna redhat com>
---
 src/conf/device_conf.c   | 15 +++++++++++++++
 src/conf/device_conf.h   |  2 ++
 src/conf/domain_conf.c   | 14 --------------
 src/conf/domain_conf.h   |  1 -
 src/libvirt_private.syms |  2 +-
 5 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
index 7a8f84e036..dd381f303e 100644
--- a/src/conf/device_conf.c
+++ b/src/conf/device_conf.c
@@ -32,6 +32,21 @@
 
 #define VIR_FROM_THIS VIR_FROM_DEVICE
 
+VIR_ENUM_IMPL(virDomainDeviceAddress, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_LAST,
+              "none",
+              "pci",
+              "drive",
+              "virtio-serial",
+              "ccid",
+              "usb",
+              "spapr-vio",
+              "virtio-s390",
+              "ccw",
+              "virtio-mmio",
+              "isa",
+              "dimm",
+);
+
 int
 virDomainDeviceInfoCopy(virDomainDeviceInfoPtr dst,
                         virDomainDeviceInfoPtr src)
diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h
index ff7d6c9d5f..66a999760c 100644
--- a/src/conf/device_conf.h
+++ b/src/conf/device_conf.h
@@ -51,6 +51,8 @@ typedef enum {
     VIR_DOMAIN_DEVICE_ADDRESS_TYPE_LAST
 } virDomainDeviceAddressType;
 
+VIR_ENUM_DECL(virDomainDeviceAddress);
+
 typedef struct _virDomainDeviceDriveAddress virDomainDeviceDriveAddress;
 typedef virDomainDeviceDriveAddress *virDomainDeviceDriveAddressPtr;
 struct _virDomainDeviceDriveAddress {
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 38cac07913..2a22978855 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -263,20 +263,6 @@ VIR_ENUM_IMPL(virDomainDevice, VIR_DOMAIN_DEVICE_LAST,
               "iommu",
               "vsock")
 
-VIR_ENUM_IMPL(virDomainDeviceAddress, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_LAST,
-              "none",
-              "pci",
-              "drive",
-              "virtio-serial",
-              "ccid",
-              "usb",
-              "spapr-vio",
-              "virtio-s390",
-              "ccw",
-              "virtio-mmio",
-              "isa",
-              "dimm")
-
 VIR_ENUM_IMPL(virDomainDiskDevice, VIR_DOMAIN_DISK_DEVICE_LAST,
               "disk",
               "cdrom",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 8a3673361a..2a827a093f 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -3380,7 +3380,6 @@ VIR_ENUM_DECL(virDomainCapsFeature)
 VIR_ENUM_DECL(virDomainLifecycle)
 VIR_ENUM_DECL(virDomainLifecycleAction)
 VIR_ENUM_DECL(virDomainDevice)
-VIR_ENUM_DECL(virDomainDeviceAddress)
 VIR_ENUM_DECL(virDomainDiskDevice)
 VIR_ENUM_DECL(virDomainDiskGeometryTrans)
 VIR_ENUM_DECL(virDomainDiskBus)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 954ab4b66c..ae0c26ba99 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -95,6 +95,7 @@ virCPUModeTypeToString;
 # conf/device_conf.h
 virDeviceInfoPCIAddressIsPresent;
 virDeviceInfoPCIAddressIsWanted;
+virDomainDeviceAddressTypeToString;
 virDomainDeviceInfoAddressIsEqual;
 virDomainDeviceInfoCopy;
 virInterfaceLinkFormat;
@@ -291,7 +292,6 @@ virDomainDefValidate;
 virDomainDefVcpuOrderClear;
 virDomainDeleteConfig;
 virDomainDeviceAddressIsValid;
-virDomainDeviceAddressTypeToString;
 virDomainDeviceAliasIsUserAlias;
 virDomainDeviceDefCopy;
 virDomainDeviceDefFree;
-- 
2.17.1


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