From: Lennart Poettering Date: Thu, 1 Dec 2016 11:40:23 +0000 (+0100) Subject: nspawn: improve log messages X-Git-Tag: v233~368^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec57bd426a1130e93946b39c20823c7420902695;p=thirdparty%2Fsystemd.git nspawn: improve log messages When complaining about the inability to resolve a path, show the full path, not just the relative one. As suggested by @keszybz. --- diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c index 3a069cf0e02..9024ea1385c 100644 --- a/src/nspawn/nspawn-mount.c +++ b/src/nspawn/nspawn-mount.c @@ -589,7 +589,7 @@ int mount_all(const char *dest, r = chase_symlinks(mount_table[k].where, dest, CHASE_NON_EXISTING|CHASE_PREFIX_ROOT, &where); if (r < 0) - return log_error_errno(r, "Failed to resolve %s: %m", mount_table[k].where); + return log_error_errno(r, "Failed to resolve %s/%s: %m", dest, mount_table[k].where); r = path_is_mount_point(where, NULL, 0); if (r < 0 && r != -ENOENT) @@ -688,7 +688,7 @@ static int mount_bind(const char *dest, CustomMount *m) { r = chase_symlinks(m->destination, dest, CHASE_PREFIX_ROOT|CHASE_NON_EXISTING, &where); if (r < 0) - return log_error_errno(r, "Failed to resolve %s: %m", m->destination); + return log_error_errno(r, "Failed to resolve %s/%s: %m", dest, m->destination); if (r > 0) { /* Path exists already? */ if (stat(where, &dest_st) < 0) @@ -750,7 +750,7 @@ static int mount_tmpfs( r = chase_symlinks(m->destination, dest, CHASE_PREFIX_ROOT|CHASE_NON_EXISTING, &where); if (r < 0) - return log_error_errno(r, "Failed to resolve %s: %m", m->destination); + return log_error_errno(r, "Failed to resolve %s/%s: %m", dest, m->destination); if (r == 0) { /* Doesn't exist yet? */ r = mkdir_p_label(where, 0755); if (r < 0) @@ -791,7 +791,7 @@ static int mount_overlay(const char *dest, CustomMount *m) { r = chase_symlinks(m->destination, dest, CHASE_PREFIX_ROOT|CHASE_NON_EXISTING, &where); if (r < 0) - return log_error_errno(r, "Failed to resolve %s: %m", m->destination); + return log_error_errno(r, "Failed to resolve %s/%s: %m", dest, m->destination); if (r == 0) { /* Doesn't exist yet? */ r = mkdir_label(where, 0755); if (r < 0)