diff mbox

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

Message ID 20161009133135.GA4583@obsidian (mailing list archive)
State Not Applicable, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Eugene Syromyatnikov Oct. 9, 2016, 1:31 p.m. UTC
---
 dm.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox

Patch

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