[libosinfo PATCH 1/2] loader: Properly load the arch value for images

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

 



osinfo_loader_image() has been considering the XML tag for the
images' architecture was "architecture", while it actually is "arch".

By trying to read the wrong tag, no arch was loaded, causing then any
image load to fail with:
CRITICAL **: 13:30:06.539: osinfo_entity_set_param: assertion 'value != NULL' failed

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 osinfo/osinfo_loader.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
index e30148b..84c25e5 100644
--- a/osinfo/osinfo_loader.c
+++ b/osinfo/osinfo_loader.c
@@ -1312,8 +1312,7 @@ static OsinfoImage *osinfo_loader_image(OsinfoLoader *loader,
         { NULL, G_TYPE_INVALID }
     };
 
-    gchar *arch = (gchar *)xmlGetProp(root,
-                                      BAD_CAST OSINFO_IMAGE_PROP_ARCHITECTURE);
+    gchar *arch = (gchar *)xmlGetProp(root, BAD_CAST "arch");
     gchar *format = (gchar *)xmlGetProp(root,
                                         BAD_CAST OSINFO_IMAGE_PROP_FORMAT);
     gchar *cloud_init = (gchar *)xmlGetProp(root,
-- 
2.20.1

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux