--- udev.c.orig 2021-05-31 20:02:30.275345666 +0300 +++ udev.c 2020-10-03 11:02:55.000000000 +0300 @@ -190,12 +190,11 @@ list = g_udev_client_query_by_subsystem(client, subsys[0]); for (iter = list; iter; iter = g_list_next(iter)) { - println("%s", g_udev_device_get_name(iter->data)); - dump_device_and_parent(iter->data, 0); - if (device_is_valid(iter->data)) { - device_dump_config(iter->data); + dump_device_and_parent(G_UDEV_DEVICE(iter->data), 0); + if (device_is_valid(G_UDEV_DEVICE(iter->data))) { + device_dump_config(G_UDEV_DEVICE(iter->data)); } - g_object_unref(iter->data); + g_object_unref(G_UDEV_DEVICE(iter->data)); } }