Skip to content

Commit

Permalink
mount: make error messages differ in different places
Browse files Browse the repository at this point in the history
We have three of "Can't mount at %s", let's distinguish simple mount
from bind-mount and re-mount to make log reading easier.

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
  • Loading branch information
Snorch committed Mar 21, 2022
1 parent bded0a3 commit 392e91b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions criu/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -2485,14 +2485,14 @@ static int do_bind_mount(struct mount_info *mi)
}

if (mount(root, service_mountpoint(mi), NULL, MS_BIND | (mi->flags & MS_REC), NULL) < 0) {
pr_perror("Can't mount at %s", service_mountpoint(mi));
pr_perror("Can't bind-mount at %s", service_mountpoint(mi));
goto err;
}

mflags = mi->flags & (~MS_PROPAGATE);
if (!mi->bind || mflags != (mi->bind->flags & (~MS_PROPAGATE)))
if (mount(NULL, service_mountpoint(mi), NULL, MS_BIND | MS_REMOUNT | mflags, NULL)) {
pr_perror("Can't mount at %s", service_mountpoint(mi));
pr_perror("Can't re-mount at %s", service_mountpoint(mi));
goto err;
}

Expand Down

0 comments on commit 392e91b

Please sign in to comment.