Skip to content

Commit

Permalink
hv: long and long long is same for printf within x86_64
Browse files Browse the repository at this point in the history
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: projectacrn#1230
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
  • Loading branch information
fyin1 authored and lijinxia committed Sep 17, 2018
1 parent a47f5d4 commit c307e1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hypervisor/lib/sprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c307e1b

Please sign in to comment.