From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eugene Syromyatnikov Subject: [PATCH 20/21] dm: Fix printing of version field Date: Sun, 9 Oct 2016 16:31:35 +0300 Message-ID: <20161009133135.GA4583@obsidian> References: <20161005.192828.566127461630656590.yamato@redhat.com> Reply-To: strace development list Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20161005.192828.566127461630656590.yamato-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: strace-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: strace-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Cc: dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, mpatocka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org List-Id: dm-devel.ids --- 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 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot