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

[libvirt] [libvirt-glib] Keep domain devices list sorted



From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>

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


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