projects
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ee9730
)
udev-node: stack directory must exist when adding device node symlink
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 31 Aug 2021 19:14:42 +0000
(
04:14
+0900)
committer
Michael Biebl
<biebl@debian.org>
Tue, 2 Nov 2021 16:29:45 +0000
(16:29 +0000)
(cherry picked from commit
46070dbf26435ba0def099121f46a6253f3f19b6
)
Gbp-Pq: Name udev-node-stack-directory-must-exist-when-adding-device-n.patch
src/udev/udev-node.c
patch
|
blob
|
history
diff --git
a/src/udev/udev-node.c
b/src/udev/udev-node.c
index 7cc9ee3670e7746959e5077229db17b975da0c1a..4496a2bd9b770d64df6f7d93f571b5e41686b4b0 100644
(file)
--- a/
src/udev/udev-node.c
+++ b/
src/udev/udev-node.c
@@
-161,12
+161,13
@@
static int link_find_prioritized(sd_device *dev, bool add, const char *stackdir,
dir = opendir(stackdir);
if (!dir) {
- if (
errno == ENOENT) {
-
*ret = TAKE_PTR(target)
;
- return !!*ret;
- }
+ if (
add) /* The stack directory must exist. */
+
return -errno
;
+ if (errno != ENOENT)
+ return -errno;
- return -errno;
+ *ret = NULL;
+ return 0;
}
r = device_get_device_id(dev, &id);