[PATCH 20/21] dm: Fix printing of version field

Eugene Syromyatnikov evgsyr at gmail.com
Sun Oct 9 13:31:35 UTC 2016


---
 dm.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dm.c b/dm.c
index a48aa72..ff9e8ad 100644
--- a/dm.c
+++ b/dm.c
@@ -342,7 +342,11 @@ dm_known_ioctl(struct tcb *tcp, const unsigned int code, long arg)
 		return 1;
 	}
 
-	tprintf("%s{version=%d.%d.%d",  entering(tcp) ? ", " : " => ",
+	/*
+	 * device mapper code uses %d in some places and %u in another, but
+	 * fields themselves are declared as __u32.
+	 */
+	tprintf("%s{version=%u.%u.%u",  entering(tcp) ? ", " : " => ",
 		ioc->version[0], ioc->version[1], ioc->version[2]);
 	/*
 	 * if we use a different version of ABI, do not attempt to decode
-- 
1.7.10.4





More information about the Strace-devel mailing list