[libosinfo PATCH 1/3] db: Set the os to the detected tree

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

 



When detecting a tree, let's also its OS.

https://gitlab.com/libosinfo/libosinfo/issues/25

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 osinfo/osinfo_db.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/osinfo/osinfo_db.c b/osinfo/osinfo_db.c
index 1089644..b7da2b7 100644
--- a/osinfo/osinfo_db.c
+++ b/osinfo/osinfo_db.c
@@ -829,8 +829,10 @@ static gboolean compare_tree(OsinfoTree *tree,
         g_list_free(trees);
         g_object_unref(tree_list);
 
-        if (*ret_os != NULL)
+        if (*ret_os != NULL) {
+            osinfo_tree_set_os(*matched, *ret_os);
             return TRUE;
+        }
     }
 
     return FALSE;
-- 
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