sd-device: make sd_device_get_is_initialized() returns is_initialized by return value

This commit is contained in:
Yu Watanabe
2018-10-29 17:33:33 +09:00
parent 78ffb476f2
commit 5a937ea2f6
9 changed files with 28 additions and 33 deletions
+3 -3
View File
@@ -3333,8 +3333,8 @@ ipv4ll_address_fail:
int link_add(Manager *m, sd_netlink_message *message, Link **ret) {
_cleanup_(sd_device_unrefp) sd_device *device = NULL;
char ifindex_str[2 + DECIMAL_STR_MAX(int)];
int initialized, r;
Link *link;
int r;
assert(m);
assert(m->rtnl);
@@ -3362,12 +3362,12 @@ int link_add(Manager *m, sd_netlink_message *message, Link **ret) {
goto failed;
}
r = sd_device_get_is_initialized(device, &initialized);
r = sd_device_get_is_initialized(device);
if (r < 0) {
log_link_warning_errno(link, r, "Could not determine whether the device is initialized or not: %m");
goto failed;
}
if (!initialized) {
if (r == 0) {
/* not yet ready */
log_link_debug(link, "link pending udev initialization...");
return 0;