diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-05-18 15:14:20 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-05-18 16:50:24 +0200 |
commit | e85c644ede7ee73a7bd72702b68a727fe2740f16 (patch) | |
tree | cd90af994c067c3c020cf1f16088072851cc392c /src/nspawn/nspawn-mount.c | |
parent | test: add a couple of tests for nspawn config files (diff) | |
download | systemd-e85c644ede7ee73a7bd72702b68a727fe2740f16.tar.xz systemd-e85c644ede7ee73a7bd72702b68a727fe2740f16.zip |
nspawn: make the error message less confusing
by not printing (null) and dropping the extraneous slash, e.g.:
systemd-nspawn[2049]: Failed to resolve (null)//proc: Permission denied
Diffstat (limited to '')
-rw-r--r-- | src/nspawn/nspawn-mount.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c index ac9dc5116e..fcf5c710f1 100644 --- a/src/nspawn/nspawn-mount.c +++ b/src/nspawn/nspawn-mount.c @@ -638,7 +638,7 @@ int mount_all(const char *dest, r = chase(mount_table[k].where, dest, CHASE_NONEXISTENT|CHASE_PREFIX_ROOT, &where, NULL); if (r < 0) - return log_error_errno(r, "Failed to resolve %s/%s: %m", dest, mount_table[k].where); + return log_error_errno(r, "Failed to resolve %s%s: %m", strempty(dest), mount_table[k].where); /* Skip this entry if it is not a remount. */ if (mount_table[k].what) { @@ -697,7 +697,7 @@ int mount_all(const char *dest, * for those. */ r = chase(mount_table[k].what, dest, CHASE_PREFIX_ROOT, &prefixed, NULL); if (r < 0) - return log_error_errno(r, "Failed to resolve %s/%s: %m", dest, mount_table[k].what); + return log_error_errno(r, "Failed to resolve %s%s: %m", strempty(dest), mount_table[k].what); } r = mount_verbose_full( |