nspawn: use the just returned errno in the log message

Use the returned errno even though we are going to ignore it, otherwise
the log message is just confusing:

config.json:119:13: Failed to resolve device node 4:2, ignoring: Success
This commit is contained in:
Frantisek Sumsal
2023-05-16 11:27:10 +02:00
parent ec0d7e0dd5
commit e5c275fedc
+1 -1
View File
@@ -874,7 +874,7 @@ static int oci_devices(const char *name, JsonVariant *v, JsonDispatchFlags flags
/* Suppress a couple of implicit device nodes */
r = devname_from_devnum(node->mode, makedev(node->major, node->minor), &path);
if (r < 0)
json_log(e, flags|JSON_DEBUG, 0, "Failed to resolve device node %u:%u, ignoring: %m", node->major, node->minor);
json_log(e, flags|JSON_DEBUG, r, "Failed to resolve device node %u:%u, ignoring: %m", node->major, node->minor);
else {
if (PATH_IN_SET(path,
"/dev/null",