[CRIU] [PATCH 1/1] mount: always report ->mnt_id as decimal

Oleg Nesterov oleg at redhat.com
Thu Mar 26 09:08:28 PDT 2015


validate_mounts() prints ->mnt_id in hex when it reports the failure.
This complicates the understanding because this ->mnt_id is printed as
decimal elsewhere, including /proc/$pid/mountinfo.

parse_mountinfo() adds "0x" at least and this is just pr_info(), but
lets change it too.

Signed-off-by: Oleg Nesterov <oleg at redhat.com>
---
 mount.c      |    2 +-
 proc_parse.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mount.c b/mount.c
index e59cb0d..021c6e3 100644
--- a/mount.c
+++ b/mount.c
@@ -591,7 +591,7 @@ static int validate_mounts(struct mount_info *info, bool for_dump)
 
 		if (fsroot_mounted(m)) {
 			if (m->fstype->code == FSTYPE__UNSUPPORTED) {
-				pr_err("FS mnt %s dev %#x root %s unsupported id %x\n",
+				pr_err("FS mnt %s dev %#x root %s unsupported id %d\n",
 						m->mountpoint, m->s_dev, m->root, m->mnt_id);
 				return -1;
 			}
diff --git a/proc_parse.c b/proc_parse.c
index 8ad9d21..3009905 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -1009,7 +1009,7 @@ struct mount_info *parse_mountinfo(pid_t pid, struct ns_id *nsid)
 			goto err;
 		}
 
-		pr_info("\ttype %s source %s mnt_id %#x s_dev %#x %s @ %s flags %#x options %s\n",
+		pr_info("\ttype %s source %s mnt_id %d s_dev %#x %s @ %s flags %#x options %s\n",
 				fst ? : new->fstype->name, new->source,
 				new->mnt_id, new->s_dev, new->root, new->mountpoint,
 				new->flags, new->options);
-- 
1.5.5.1




More information about the CRIU mailing list