diff mbox

[09/18] bios: ebdadump: print format using inttypes

Message ID 1348427041-4913-10-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

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

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/bios/ebdadump/ebdadump.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Keng-Yu Lin Sept. 26, 2012, 10:08 a.m. UTC | #1
On Mon, Sep 24, 2012 at 3:03 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/bios/ebdadump/ebdadump.c |    8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/bios/ebdadump/ebdadump.c b/src/bios/ebdadump/ebdadump.c
> index d7ac4cd..48e9d96 100644
> --- a/src/bios/ebdadump/ebdadump.c
> +++ b/src/bios/ebdadump/ebdadump.c
> @@ -18,6 +18,8 @@
>   */
>
>  #include "fwts.h"
> +#include <stdint.h>
> +#include <inttypes.h>
>
>  #ifdef FWTS_ARCH_INTEL
>
> @@ -59,10 +61,10 @@ static int ebdadump_test1(fwts_framework *fw)
>                 return FWTS_ERROR;
>         }
>
> -       fwts_log_info(fw, "EBDA region: %x..%x (%d bytes)",
> -               (unsigned int)ebda_addr,
> +       fwts_log_info(fw, "EBDA region: %" PRIx32 "..%x (%zd bytes)",
> +               (uint32_t)ebda_addr,
>                 BIOS_ROM_START,
> -               (unsigned int)len);
> +               len);
>
>         ebdadump_data(fw, mem, ebda_addr, len);
>          (void)fwts_munmap(mem, len);
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu Oct. 2, 2012, 2:27 a.m. UTC | #2
On 09/24/2012 03:03 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/bios/ebdadump/ebdadump.c |    8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/bios/ebdadump/ebdadump.c b/src/bios/ebdadump/ebdadump.c
> index d7ac4cd..48e9d96 100644
> --- a/src/bios/ebdadump/ebdadump.c
> +++ b/src/bios/ebdadump/ebdadump.c
> @@ -18,6 +18,8 @@
>    */
>
>   #include "fwts.h"
> +#include <stdint.h>
> +#include <inttypes.h>
>
>   #ifdef FWTS_ARCH_INTEL
>
> @@ -59,10 +61,10 @@ static int ebdadump_test1(fwts_framework *fw)
>   		return FWTS_ERROR;
>   	}
>
> -	fwts_log_info(fw, "EBDA region: %x..%x (%d bytes)",
> -		(unsigned int)ebda_addr,
> +	fwts_log_info(fw, "EBDA region: %" PRIx32 "..%x (%zd bytes)",
> +		(uint32_t)ebda_addr,
>   		BIOS_ROM_START,
> -		(unsigned int)len);
> +		len);
>
>   	ebdadump_data(fw, mem, ebda_addr, len);
>           (void)fwts_munmap(mem, len);
>

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

Patch

diff --git a/src/bios/ebdadump/ebdadump.c b/src/bios/ebdadump/ebdadump.c
index d7ac4cd..48e9d96 100644
--- a/src/bios/ebdadump/ebdadump.c
+++ b/src/bios/ebdadump/ebdadump.c
@@ -18,6 +18,8 @@ 
  */
 
 #include "fwts.h"
+#include <stdint.h>
+#include <inttypes.h>
 
 #ifdef FWTS_ARCH_INTEL
 
@@ -59,10 +61,10 @@  static int ebdadump_test1(fwts_framework *fw)
 		return FWTS_ERROR;
 	}
 
-	fwts_log_info(fw, "EBDA region: %x..%x (%d bytes)",
-		(unsigned int)ebda_addr,
+	fwts_log_info(fw, "EBDA region: %" PRIx32 "..%x (%zd bytes)",
+		(uint32_t)ebda_addr,
 		BIOS_ROM_START,
-		(unsigned int)len);
+		len);
 
 	ebdadump_data(fw, mem, ebda_addr, len);
         (void)fwts_munmap(mem, len);