mount: replace mountpoint to mnt_id in error messages

Replace in restore_shared_options "->mountpoint" in messages with more
descriptive "->mnt_id". Mountpoints concide a lot, and mnt_id is unique.
These also makes a message shorter. (We already print a mapping from
mnt_id to mountpoint in mnt_tree_show, so we can easily find mountpoint
if we want).

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
Pavel Tikhomirov 2019-10-07 11:45:13 +03:00 committed by Andrei Vagin
parent f3b18865f9
commit b554eacb51

View file

@ -1868,15 +1868,15 @@ static int restore_shared_options(struct mount_info *mi, bool private, bool shar
}
if (private && mount(NULL, mi->mountpoint, NULL, MS_PRIVATE, NULL)) {
pr_perror("Unable to make %s private", mi->mountpoint);
pr_perror("Unable to make %d private", mi->mnt_id);
return -1;
}
if (slave && mount(NULL, mi->mountpoint, NULL, MS_SLAVE, NULL)) {
pr_perror("Unable to make %s slave", mi->mountpoint);
pr_perror("Unable to make %d slave", mi->mnt_id);
return -1;
}
if (shared && mount(NULL, mi->mountpoint, NULL, MS_SHARED, NULL)) {
pr_perror("Unable to make %s shared", mi->mountpoint);
pr_perror("Unable to make %d shared", mi->mnt_id);
return -1;
}