summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2023-05-15 19:06:14 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2023-05-16 11:27:10 +0200
commite5c275fedc0ab416730fe288a8754a20a014e200 (patch)
tree6349d5a2298139082a5019baf29ad86dbef2fea3
parentec0d7e0dd5c2fecfdbe7c02573b22a28200479f6 (diff)
downloadsystemd-e5c275fedc0ab416730fe288a8754a20a014e200.tar.gz
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
-rw-r--r--src/nspawn/nspawn-oci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nspawn/nspawn-oci.c b/src/nspawn/nspawn-oci.c
index fc9b763a96..2b1fae0df4 100644
--- a/src/nspawn/nspawn-oci.c
+++ b/src/nspawn/nspawn-oci.c
@@ -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",