From c307e1b6ebbb2488b4adbd0273bb1b0670150e80 Mon Sep 17 00:00:00 2001 From: Yin Fengwei Date: Wed, 12 Sep 2018 21:59:25 +0800 Subject: [PATCH] hv: long and long long is same for printf within x86_64 In ACRN hypervisor, u/int64_t is defined as unsigned/ long. It's nature to use %l to print it. But current printf use %l to print int and only use %ll for long. This patch fix it by treat long and long long same for printf. Tracked-On: #1230 Signed-off-by: Yin Fengwei Acked-by: Eddie Dong --- hypervisor/lib/sprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hypervisor/lib/sprintf.c b/hypervisor/lib/sprintf.c index cbaf84b70f..c8d7ab0f6e 100644 --- a/hypervisor/lib/sprintf.c +++ b/hypervisor/lib/sprintf.c @@ -38,8 +38,8 @@ /** The original value was a (unsigned) short. */ #define PRINT_FLAG_SHORT 0x00000080U -/** The original value was a (unsigned) long. */ -#define PRINT_FLAG_LONG 0x00000100U +/** The original value was a (unsigned) long. 64bit on ACRN also */ +#define PRINT_FLAG_LONG 0x00000200U /** The original value was a (unsigned) long long. */ #define PRINT_FLAG_LONG_LONG 0x00000200U