[Libosinfo] [libosinfo PATCH v2 11/15] os: Use get_devices_internal in _get_all callback

Fabiano Fidêncio fidencio at redhat.com
Mon Nov 12 10:30:58 UTC 2018


This commit is just preparing the ground for changes that will come in
the next commits where we'll start supporting "removed" devices and in
order to so, we'll have to explicitly call _get_devices_internal()
forcing it to return *all* devices, even the "removed" ones, as they'll
be filtered out later.

https://gitlab.com/libosinfo/osinfo-db/issues/13

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 osinfo/osinfo_os.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/osinfo/osinfo_os.c b/osinfo/osinfo_os.c
index 687e3ed..62d19f8 100644
--- a/osinfo/osinfo_os.c
+++ b/osinfo/osinfo_os.c
@@ -257,8 +257,9 @@ static void get_all_devices_cb(OsinfoProduct *product, gpointer user_data)
 
     g_return_if_fail(OSINFO_IS_OS(product));
 
-    devices = osinfo_os_get_devices(OSINFO_OS(product),
-                                    foreach_data->filter);
+    devices = osinfo_os_get_devices_internal(OSINFO_OS(product),
+                                             foreach_data->filter,
+                                             TRUE);
     tmp_list = osinfo_list_new_union(OSINFO_LIST(foreach_data->devices),
                                      OSINFO_LIST(devices));
     g_object_unref(foreach_data->devices);
-- 
2.19.1




More information about the Libosinfo mailing list