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:
Christian Göttsche 2020-07-11 21:12:08 +02:00
parent b159831b61
commit db06c162e8
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}