mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
net: cosmetic: Make the MAC address string less magical
In u-boot printf has been extended with the %pM formatter to allow printing of MAC addresses. However buffers that want to store a MAC address cannot safely get the size. Add a define for this case so the string of a MAC address can be reliably obtained. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
a40db6d511
commit
9f455bcb34
2 changed files with 6 additions and 1 deletions
|
@ -32,7 +32,7 @@ int eth_getenv_enetaddr(const char *name, uchar *enetaddr)
|
|||
|
||||
int eth_setenv_enetaddr(const char *name, const uchar *enetaddr)
|
||||
{
|
||||
char buf[20];
|
||||
char buf[ARP_HLEN_ASCII + 1];
|
||||
|
||||
sprintf(buf, "%pM", enetaddr);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue