From: Franck Bui Date: Tue, 3 Jan 2023 16:38:59 +0000 (+0100) Subject: udev: return ENODEV if link_directory_read_one() can't find the devnode X-Git-Tag: v253-rc1~115^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8a54a4e759517aea2cb5c91f4195a24168054d0;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index 47761289334..e1e16950509 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)