Skip to content

Commit c307e1b

Browse files
fyin1lijinxia
authored andcommitted
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 <fengwei.yin@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent a47f5d4 commit c307e1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hypervisor/lib/sprintf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
/** The original value was a (unsigned) short. */
3939
#define PRINT_FLAG_SHORT 0x00000080U
4040

41-
/** The original value was a (unsigned) long. */
42-
#define PRINT_FLAG_LONG 0x00000100U
41+
/** The original value was a (unsigned) long. 64bit on ACRN also */
42+
#define PRINT_FLAG_LONG 0x00000200U
4343

4444
/** The original value was a (unsigned) long long. */
4545
#define PRINT_FLAG_LONG_LONG 0x00000200U

0 commit comments

Comments
 (0)