[Libosinfo] [libosinfo PATCH 19/31] os: Use _linklist_get_targets()

Fabiano Fidêncio fidencio at redhat.com
Fri Nov 23 10:15:08 UTC 2018


Let's replace the only usage of _devicelinklist_get_devices() for its
parent method _linklist_get_targets().

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

diff --git a/osinfo/osinfo_os.c b/osinfo/osinfo_os.c
index 0a8754d..32b107c 100644
--- a/osinfo/osinfo_os.c
+++ b/osinfo/osinfo_os.c
@@ -348,7 +348,10 @@ OsinfoDeviceList *osinfo_os_get_all_devices(OsinfoOs *os, OsinfoFilter *filter)
     unsupported_devlinks = OSINFO_DEVICELINKLIST
         (osinfo_list_new_filtered(OSINFO_LIST(devlinks), unsupported_filter));
 
-    unsupported_devs = osinfo_devicelinklist_get_devices(unsupported_devlinks, NULL);
+    unsupported_devs = osinfo_devicelist_new();
+    osinfo_linklist_get_targets(OSINFO_LINKLIST(unsupported_devlinks),
+                                NULL,
+                                OSINFO_LIST(unsupported_devs));
 
     list = osinfo_list_get_elements(OSINFO_LIST(foreach_data.devices));
     unsupported_list = osinfo_list_get_elements(OSINFO_LIST(unsupported_devs));
-- 
2.19.1




More information about the Libosinfo mailing list