mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-27 18:55:09 +03:00
sd-device: be more defensive in FOREACH_DEVICE_SYSATTR
Follow-up for fadcc12229
.
This commit is contained in:
parent
21df146501
commit
21c7fe6d12
@ -1585,6 +1585,10 @@ static int device_sysattrs_read_all_internal(sd_device *device, const char *subd
|
||||
if (access(p, F_OK) >= 0)
|
||||
/* this is a child device, skipping */
|
||||
return 0;
|
||||
if (errno != ENOENT) {
|
||||
log_debug_errno(errno, "Failed to stat %s, ignoring subdir: %m", p);
|
||||
return 0;
|
||||
}
|
||||
|
||||
path_dir = path_join(syspath, subdir);
|
||||
if (!path_dir)
|
||||
|
Loading…
Reference in New Issue
Block a user