[libvirt-glib] Keep domain devices list sorted

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

 



From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>

While we don't guarantee the order of devices in the list returned from
gvir_domain_get_devices(), its not a bad idea to keep them sorted the
same way we get them from configuration (XML).
---
 libvirt-gobject/libvirt-gobject-domain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
index 7b2c7ad..0bafa7e 100644
--- a/libvirt-gobject/libvirt-gobject-domain.c
+++ b/libvirt-gobject/libvirt-gobject-domain.c
@@ -909,5 +909,5 @@ GList *gvir_domain_get_devices(GVirDomain *domain,
     }
     g_list_free (config_devices);
 
-    return ret;
+    return g_list_reverse (ret);
 }
-- 
1.7.7.6

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