tree-wide: use device_is_processed() more
This commit is contained in:
@@ -487,7 +487,7 @@ static int test_network_interface_initialized(const char *name) {
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to get device %s: %m", name);
|
||||
|
||||
r = sd_device_get_is_initialized(d);
|
||||
r = device_is_processed(d);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to determine whether interface %s is initialized: %m", name);
|
||||
if (r == 0)
|
||||
|
||||
@@ -139,7 +139,7 @@ static int device_wait_for_initialization_internal(
|
||||
}
|
||||
|
||||
if (device) {
|
||||
if (sd_device_get_is_initialized(device) > 0) {
|
||||
if (device_is_processed(device) > 0) {
|
||||
if (ret)
|
||||
*ret = sd_device_ref(device);
|
||||
return 0;
|
||||
@@ -202,7 +202,7 @@ static int device_wait_for_initialization_internal(
|
||||
if (r < 0 && !ERRNO_IS_DEVICE_ABSENT(r))
|
||||
return log_error_errno(r, "Failed to create sd-device object from %s: %m", devlink);
|
||||
}
|
||||
if (device && sd_device_get_is_initialized(device) > 0) {
|
||||
if (device && device_is_processed(device) > 0) {
|
||||
if (ret)
|
||||
*ret = sd_device_ref(device);
|
||||
return 0;
|
||||
|
||||
@@ -67,7 +67,7 @@ static int check_device(const char *path) {
|
||||
return r;
|
||||
|
||||
if (arg_wait_until == WAIT_UNTIL_INITIALIZED)
|
||||
return sd_device_get_is_initialized(dev);
|
||||
return device_is_processed(dev);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user