mirror of
https://github.com/systemd/systemd.git
synced 2024-11-07 18:27:04 +03:00
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:
parent
1ed555b712
commit
02a8bd656c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user