mirror of
https://github.com/systemd/systemd.git
synced 2025-01-23 02:04:32 +03:00
udev: return ENODEV if link_directory_read_one() can't find the devnode
That's usually the errno code we return when a device cannot be found because it's been unplugged.
This commit is contained in:
parent
72a459adc4
commit
e8a54a4e75
@ -133,7 +133,7 @@ static int stack_directory_read_one(int dirfd, const char *id, bool is_symlink,
|
|||||||
* symlink will be removed during processing the event. The check is just for shortening the
|
* symlink will be removed during processing the event. The check is just for shortening the
|
||||||
* timespan that the symlink points to a non-existing device node. */
|
* timespan that the symlink points to a non-existing device node. */
|
||||||
if (access(colon + 1, F_OK) < 0)
|
if (access(colon + 1, F_OK) < 0)
|
||||||
return -errno;
|
return -ENODEV;
|
||||||
|
|
||||||
r = safe_atoi(buf, &tmp_prio);
|
r = safe_atoi(buf, &tmp_prio);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user