Skip to content
Snippets Groups Projects
Commit b361acd6 authored by ksi@koi8.net's avatar ksi@koi8.net Committed by Wolfgang Denk
Browse files

TI DaVinci - fix unsupported %hhx format


Signed-off-by: default avatarSergey Kubushyn <ksi@koi8.net>
parent 541d41b2
No related branches found
No related tags found
No related merge requests found
...@@ -181,7 +181,7 @@ int misc_init_r (void) ...@@ -181,7 +181,7 @@ int misc_init_r (void)
tmp[0] &= buf[i]; tmp[0] &= buf[i];
if ((tmp[0] != 0xff) && (getenv("ethaddr") == NULL)) { 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]); buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]);
setenv("ethaddr", (char *)&tmp[0]); setenv("ethaddr", (char *)&tmp[0]);
} }
......
...@@ -228,7 +228,7 @@ int misc_init_r (void) ...@@ -228,7 +228,7 @@ int misc_init_r (void)
forceenv("serial#", "FAILED"); forceenv("serial#", "FAILED");
} else { } else {
/* CRC OK, set "serial" env variable */ /* 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]); buf[6], buf[5], buf[4], buf[3], buf[2], buf[1]);
forceenv("serial#", (char *)&tmp[0]); forceenv("serial#", (char *)&tmp[0]);
} }
......
...@@ -182,7 +182,7 @@ int misc_init_r (void) ...@@ -182,7 +182,7 @@ int misc_init_r (void)
tmp[0] &= buf[i]; tmp[0] &= buf[i];
if ((tmp[0] != 0xff) && (getenv("ethaddr") == NULL)) { 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]); buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]);
setenv("ethaddr", (char *)&tmp[0]); setenv("ethaddr", (char *)&tmp[0]);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment