Patchwork [17/18] uefi: csm: print format using inttypes

login
register
mail settings
Submitter Colin King
Date Sept. 23, 2012, 7:04 p.m.
Message ID <1348427041-4913-18-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/186266/
State Accepted
Headers show

Comments

Colin King - Sept. 23, 2012, 7:04 p.m.
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/uefi/csm/csm.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Keng-Yu Lin - Sept. 27, 2012, 9:34 a.m.
On Mon, Sep 24, 2012 at 3:04 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/uefi/csm/csm.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/uefi/csm/csm.c b/src/uefi/csm/csm.c
> index c6f614d..4f755ba 100644
> --- a/src/uefi/csm/csm.c
> +++ b/src/uefi/csm/csm.c
> @@ -20,6 +20,7 @@
>  #ifdef FWTS_ARCH_INTEL
>
>  #include <stdbool.h>
> +#include <inttypes.h>
>
>  /* Real Mode IDT */
>  #define INT_VEC_START          (0x00000000)
> @@ -67,9 +68,9 @@ static int csm_test1(fwts_framework *fw)
>                         int ROMend = BIOS_ROM_REGION_START+i+length;
>
>                         if ((ROMstart <= int10hVec) && (int10hVec <= ROMend)) {
> -                               fwts_log_info(fw, "Int 10h jumps to 0x%x in option ROM at: "
> +                               fwts_log_info(fw, "Int 10h jumps to 0x%" PRIx32 " in option ROM at: "
>                                         "0x%x..0x%0x",
> -                                       (int)int10hVec, ROMstart, ROMend);
> +                                       int10hVec, ROMstart, ROMend);
>                                 flag |= VGA_SUPPORT;
>                                 break;
>                         }
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu - Oct. 2, 2012, 2:42 a.m.
On 09/24/2012 03:04 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/uefi/csm/csm.c |    5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/uefi/csm/csm.c b/src/uefi/csm/csm.c
> index c6f614d..4f755ba 100644
> --- a/src/uefi/csm/csm.c
> +++ b/src/uefi/csm/csm.c
> @@ -20,6 +20,7 @@
>   #ifdef FWTS_ARCH_INTEL
>
>   #include <stdbool.h>
> +#include <inttypes.h>
>
>   /* Real Mode IDT */
>   #define INT_VEC_START		(0x00000000)
> @@ -67,9 +68,9 @@ static int csm_test1(fwts_framework *fw)
>   			int ROMend = BIOS_ROM_REGION_START+i+length;
>
>   			if ((ROMstart <= int10hVec) && (int10hVec <= ROMend)) {
> -				fwts_log_info(fw, "Int 10h jumps to 0x%x in option ROM at: "
> +				fwts_log_info(fw, "Int 10h jumps to 0x%" PRIx32 " in option ROM at: "
>   					"0x%x..0x%0x",
> -					(int)int10hVec, ROMstart, ROMend);
> +					int10hVec, ROMstart, ROMend);
>   				flag |= VGA_SUPPORT;
>   				break;
>   			}
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/src/uefi/csm/csm.c b/src/uefi/csm/csm.c
index c6f614d..4f755ba 100644
--- a/src/uefi/csm/csm.c
+++ b/src/uefi/csm/csm.c
@@ -20,6 +20,7 @@ 
 #ifdef FWTS_ARCH_INTEL
 
 #include <stdbool.h>
+#include <inttypes.h>
 
 /* Real Mode IDT */
 #define INT_VEC_START		(0x00000000)
@@ -67,9 +68,9 @@  static int csm_test1(fwts_framework *fw)
 			int ROMend = BIOS_ROM_REGION_START+i+length;
 
 			if ((ROMstart <= int10hVec) && (int10hVec <= ROMend)) {
-				fwts_log_info(fw, "Int 10h jumps to 0x%x in option ROM at: "
+				fwts_log_info(fw, "Int 10h jumps to 0x%" PRIx32 " in option ROM at: "
 					"0x%x..0x%0x",
-					(int)int10hVec, ROMstart, ROMend);
+					int10hVec, ROMstart, ROMend);
 				flag |= VGA_SUPPORT;
 				break;
 			}