[PATCH 09/12] qemu-command: Move remaining qemuDomain* functions

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

 



Move qemuDomainNetVLAN and qemuDomainDeviceAliasIndex into qemu_domain.c

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 22 ----------------------
 src/qemu/qemu_command.h |  1 -
 src/qemu/qemu_domain.c  | 25 +++++++++++++++++++++++++
 src/qemu/qemu_domain.h  |  4 ++++
 4 files changed, 29 insertions(+), 23 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index f4b9dcd..a37dba6 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -400,28 +400,6 @@ qemuNetworkPrepareDevices(virDomainDefPtr def)
     return ret;
 }
 
-static int qemuDomainDeviceAliasIndex(const virDomainDeviceInfo *info,
-                                      const char *prefix)
-{
-    int idx;
-
-    if (!info->alias)
-        return -1;
-    if (!STRPREFIX(info->alias, prefix))
-        return -1;
-
-    if (virStrToLong_i(info->alias + strlen(prefix), NULL, 10, &idx) < 0)
-        return -1;
-
-    return idx;
-}
-
-
-int qemuDomainNetVLAN(virDomainNetDefPtr def)
-{
-    return qemuDomainDeviceAliasIndex(&def->info, "net");
-}
-
 
 char *qemuDeviceDriveHostAlias(virDomainDiskDefPtr disk,
                                virQEMUCapsPtr qemuCaps)
diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h
index e523054..7ed0ad5 100644
--- a/src/qemu/qemu_command.h
+++ b/src/qemu/qemu_command.h
@@ -233,7 +233,6 @@ int qemuOpenVhostNet(virDomainDefPtr def,
 int qemuNetworkPrepareDevices(virDomainDefPtr def);
 
 int qemuAssignDeviceAliases(virDomainDefPtr def, virQEMUCapsPtr qemuCaps);
-int qemuDomainNetVLAN(virDomainNetDefPtr def);
 int qemuAssignDeviceNetAlias(virDomainDefPtr def, virDomainNetDefPtr net, int idx);
 int qemuAssignDeviceDiskAlias(virDomainDefPtr vmdef,
                               virDomainDiskDefPtr def,
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 0616574..4ae0b92 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -5987,3 +5987,28 @@ qemuDomainReleaseDeviceAddress(virDomainObjPtr vm,
         VIR_WARN("Unable to release virtio-serial address on %s",
                  NULLSTR(devstr));
 }
+
+
+int
+qemuDomainDeviceAliasIndex(const virDomainDeviceInfo *info,
+                           const char *prefix)
+{
+    int idx;
+
+    if (!info->alias)
+        return -1;
+    if (!STRPREFIX(info->alias, prefix))
+        return -1;
+
+    if (virStrToLong_i(info->alias + strlen(prefix), NULL, 10, &idx) < 0)
+        return -1;
+
+    return idx;
+}
+
+
+int
+qemuDomainNetVLAN(virDomainNetDefPtr def)
+{
+    return qemuDomainDeviceAliasIndex(&def->info, "net");
+}
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 88a991e..85e0308 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -534,4 +534,8 @@ void qemuDomainReleaseDeviceAddress(virDomainObjPtr vm,
                                     virDomainDeviceInfoPtr info,
                                     const char *devstr);
 
+int qemuDomainDeviceAliasIndex(const virDomainDeviceInfo *info,
+                               const char *prefix);
+int qemuDomainNetVLAN(virDomainNetDefPtr def);
+
 #endif /* __QEMU_DOMAIN_H__ */
-- 
2.5.0

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