[libosinfo PATCHv2 06/11] Set id in osinfo_install_config_param_new

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

 



OsinfoInstallConfigParam is an OsinfoEntity, but its _new method
does not set an id when creating it. This is needed if we want
to be able to use an OsinfoInstallConfigParamList. The "name"
argument that is passed at creation time is expected to be unique,
so we can use that as the entity id even though a full URI would have
been nicer.
---
 osinfo/osinfo_install_config_param.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/osinfo/osinfo_install_config_param.c b/osinfo/osinfo_install_config_param.c
index 49bbefa..307c74c 100644
--- a/osinfo/osinfo_install_config_param.c
+++ b/osinfo/osinfo_install_config_param.c
@@ -211,7 +211,10 @@ osinfo_install_config_param_init (OsinfoInstallConfigParam *config_param)
  */
 OsinfoInstallConfigParam *osinfo_install_config_param_new(const gchar *name)
 {
-    return g_object_new(OSINFO_TYPE_INSTALL_CONFIG_PARAM, "name", name, NULL);
+    return g_object_new(OSINFO_TYPE_INSTALL_CONFIG_PARAM,
+                        "id", name,
+                        "name", name,
+                        NULL);
 }
 
 /**
-- 
1.8.0.1

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list


[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux