From: ksi@koi8.net Date: Tue, 14 Aug 2007 17:02:16 +0000 (-0700) Subject: TI DaVinci - fix unsupported %hhx format X-Git-Tag: v1.3.0-rc1~19^2~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b361acd64fd2525c081b9b288b0804efe209c0e9;p=u-boot TI DaVinci - fix unsupported %hhx format Signed-off-by: Sergey Kubushyn --- diff --git a/board/davinci/dv-evm/dv_board.c b/board/davinci/dv-evm/dv_board.c index 94925ecfb1..604edb56c3 100644 --- a/board/davinci/dv-evm/dv_board.c +++ b/board/davinci/dv-evm/dv_board.c @@ -181,7 +181,7 @@ int misc_init_r (void) tmp[0] &= buf[i]; if ((tmp[0] != 0xff) && (getenv("ethaddr") == NULL)) { - sprintf((char *)&tmp[0], "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx", + sprintf((char *)&tmp[0], "%02x:%02x:%02x:%02x:%02x:%02x", buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]); setenv("ethaddr", (char *)&tmp[0]); } diff --git a/board/davinci/schmoogie/dv_board.c b/board/davinci/schmoogie/dv_board.c index b15c5f7189..9f271a1666 100644 --- a/board/davinci/schmoogie/dv_board.c +++ b/board/davinci/schmoogie/dv_board.c @@ -228,7 +228,7 @@ int misc_init_r (void) forceenv("serial#", "FAILED"); } else { /* CRC OK, set "serial" env variable */ - sprintf((char *)&tmp[0], "%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx", + sprintf((char *)&tmp[0], "%02x%02x%02x%02x%02x%02x", buf[6], buf[5], buf[4], buf[3], buf[2], buf[1]); forceenv("serial#", (char *)&tmp[0]); } diff --git a/board/davinci/sonata/dv_board.c b/board/davinci/sonata/dv_board.c index 7b0a459fa3..99857c4271 100644 --- a/board/davinci/sonata/dv_board.c +++ b/board/davinci/sonata/dv_board.c @@ -182,7 +182,7 @@ int misc_init_r (void) tmp[0] &= buf[i]; if ((tmp[0] != 0xff) && (getenv("ethaddr") == NULL)) { - sprintf((char *)&tmp[0], "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx", + sprintf((char *)&tmp[0], "%02x:%02x:%02x:%02x:%02x:%02x", buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]); setenv("ethaddr", (char *)&tmp[0]); }