From 392e91be4761e7c2de7c48178ef2f8bb1725302d Mon Sep 17 00:00:00 2001 From: Pavel Tikhomirov Date: Mon, 21 Mar 2022 10:19:29 +0300 Subject: [PATCH] mount: make error messages differ in different places 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 --- criu/mount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/criu/mount.c b/criu/mount.c index 85fcb8843f..8b6cdaf454 100644 --- a/criu/mount.c +++ b/criu/mount.c @@ -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; }