[CRIU] [PATCH 2/2] binfmt_misc: Make debug printed using pr_debug()

Kirill Tkhai ktkhai at odin.com
Thu Dec 10 02:07:07 PST 2015


It's a debug message, and it shouldn't be printed using
pr_perror(). Also, we interested in debug in the both
cases: magic and extensions. So move the print down.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 mount.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mount.c b/mount.c
index 4ada681..530fcee 100644
--- a/mount.c
+++ b/mount.c
@@ -1539,7 +1539,6 @@ static int binfmt_misc_restore(struct mount_info *mi)
 			ret = -1;
 		} else if (bme->magic) {
 			ret = make_bfmtm_magic_str(buf, bme);
-			pr_perror("xxxbuf=%s\n", buf);
 		} else if (bme->extension) {
 			/* :name:E::extension::interpreter:flags */
 			ret = snprintf(buf, BINFMT_MISC_STR, ":%s:E::%s::%s:%s",
@@ -1547,8 +1546,10 @@ static int binfmt_misc_restore(struct mount_info *mi)
 				       bme->flags ? : "\0");
 		}
 
-		if (ret > 0)
+		if (ret > 0) {
+			pr_debug("binfmt_misc_pattern=%s\n", buf);
 			ret = restore_binfmt_misc_entry(mi->mountpoint, buf, bme);
+		}
 
 		binfmt_misc_entry__free_unpacked(bme, NULL);
 	}



More information about the CRIU mailing list