mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
shared: fix error handling in make_inaccessible_nodes
_label wrappers return -errno on failure instead of returning -1 and
setting global errno.
Fixes: 8d9cbd809d
Follow up: #16426
This commit is contained in:
@@ -107,8 +107,8 @@ int make_inaccessible_nodes(
|
||||
else
|
||||
r = mknod_label(path, table[i].mode, makedev(0, 0));
|
||||
if (r < 0) {
|
||||
if (errno != EEXIST)
|
||||
log_debug_errno(errno, "Failed to create '%s', ignoring: %m", path);
|
||||
if (r != -EEXIST)
|
||||
log_debug_errno(r, "Failed to create '%s', ignoring: %m", path);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user