diff options
author | Franck Bui <fbui@suse.com> | 2023-01-03 17:38:59 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-01-13 11:22:31 +0900 |
commit | e8a54a4e759517aea2cb5c91f4195a24168054d0 (patch) | |
tree | e03977a626c2f40f61ce05663aa08485da455b9b /src/udev/udev-node.c | |
parent | 72a459adc4077047af20762e25a7a8739e81def1 (diff) | |
download | systemd-e8a54a4e759517aea2cb5c91f4195a24168054d0.tar.gz |
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.
Diffstat (limited to 'src/udev/udev-node.c')
-rw-r--r-- | src/udev/udev-node.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index 4776128933..e1e1695050 100644 --- a/src/udev/udev-node.c +++ b/src/udev/udev-node.c @@ -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 * timespan that the symlink points to a non-existing device node. */ if (access(colon + 1, F_OK) < 0) - return -errno; + return -ENODEV; r = safe_atoi(buf, &tmp_prio); if (r < 0) |