mount: always show the user-provided argument when umount can't be done

Otherwise it can be confusing if the path is not the same
This commit is contained in:
Felipe Sateler 2017-09-07 16:16:19 -03:00
parent 1ed555b712
commit 02a8bd656c
1 changed files with 3 additions and 3 deletions

View File

@ -998,7 +998,7 @@ static int action_umount(
r = path_make_absolute_cwd(u, &a);
if (r < 0) {
r2 = log_error_errno(r, "Failed to make path absolute: %m");
r2 = log_error_errno(r, "Failed to make path %s absolute: %m", argv[i]);
continue;
}
@ -1010,7 +1010,7 @@ static int action_umount(
}
if (stat(p, &st) < 0)
return log_error_errno(errno, "Can't stat %s: %m", p);
return log_error_errno(errno, "Can't stat %s (from %s): %m", p, argv[i]);
if (S_ISBLK(st.st_mode))
r = umount_by_device(bus, p);
@ -1019,7 +1019,7 @@ static int action_umount(
else if (S_ISDIR(st.st_mode))
r = stop_mounts(bus, p);
else {
log_error("Invalid file type: %s", p);
log_error("Invalid file type: %s (from %s)", p, argv[i]);
r = -EINVAL;
}