projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be322ec
)
udev: logs when failed to remove saved info about devlink
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 2 Jun 2021 14:32:17 +0000
(23:32 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Fri, 4 Jun 2021 06:51:39 +0000
(15:51 +0900)
src/udev/udev-node.c
patch
|
blob
|
history
diff --git
a/src/udev/udev-node.c
b/src/udev/udev-node.c
index 033ecc91f221d378119803e916be950cd0a71f49..1702f489d1c286559aec1698af7a31728e29b33b 100644
(file)
--- a/
src/udev/udev-node.c
+++ b/
src/udev/udev-node.c
@@
-275,8
+275,10
@@
static int link_update(sd_device *dev, const char *slink_in, bool add) {
return log_oom();
if (!add) {
- if (unlink(filename) == 0)
- (void) rmdir(dirname);
+ if (unlink(filename) < 0 && errno != ENOENT)
+ log_device_debug_errno(dev, errno, "Failed to remove %s, ignoring: %m", filename);
+
+ (void) rmdir(dirname);
} else
for (;;) {
_cleanup_close_ int fd = -1;