[libvirt-glib 06/23] Rename gvir_config_domain_new

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

 



Rename it to gvir_config_domain_new_from_xml since it takes an
XML string as input. gvir_config_domain_new will be used to create
a new empty domain.
---
 libvirt-gconfig/libvirt-gconfig-domain.c |    2 +-
 libvirt-gconfig/libvirt-gconfig-domain.h |    2 +-
 libvirt-gconfig/libvirt-gconfig.sym      |    2 +-
 libvirt-gobject/libvirt-gobject-domain.c |    6 ++++--
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c b/libvirt-gconfig/libvirt-gconfig-domain.c
index 125c1ac..2b9419e 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain.c
@@ -95,7 +95,7 @@ static void gvir_config_domain_init(GVirConfigDomain *conn)
 }
 
 
-GVirConfigDomain *gvir_config_domain_new(const gchar *xml)
+GVirConfigDomain *gvir_config_domain_new_from_xml(const gchar *xml)
 {
     return GVIR_CONFIG_DOMAIN(g_object_new(GVIR_TYPE_CONFIG_DOMAIN,
                                            "doc", xml,
diff --git a/libvirt-gconfig/libvirt-gconfig-domain.h b/libvirt-gconfig/libvirt-gconfig-domain.h
index 49c34dc..343f076 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain.h
@@ -59,7 +59,7 @@ struct _GVirConfigDomainClass
 
 GType gvir_config_domain_get_type(void);
 
-GVirConfigDomain *gvir_config_domain_new(const gchar *xml);
+GVirConfigDomain *gvir_config_domain_new_from_xml(const gchar *xml);
 
 char *gvir_config_domain_get_name(GVirConfigDomain *domain);
 
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 6127e22..76e2ba2 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -4,7 +4,7 @@ LIBVIRT_GOBJECT_0.0.1 {
 	gvir_config_capabilities_new;
 
 	gvir_config_domain_get_type;
-	gvir_config_domain_new;
+	gvir_config_domain_new_from_xml;
 	gvir_config_domain_get_name;
 
 	gvir_config_domain_snapshot_get_type;
diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
index 70d8d6d..fd5f709 100644
--- a/libvirt-gobject/libvirt-gobject-domain.c
+++ b/libvirt-gobject/libvirt-gobject-domain.c
@@ -432,9 +432,11 @@ GVirConfigDomain *gvir_domain_get_config(GVirDomain *dom,
         return NULL;
     }
 
-    GVirConfigDomain *conf = gvir_config_domain_new(xml);
-
+    GVirConfigDomain *conf = gvir_config_domain_new_from_xml(xml);
     g_free(xml);
+    if ((err != NULL) && (*err != NULL))
+        return NULL;
+
     return conf;
 }
 
-- 
1.7.6.4

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