From 855c1fc4786a1b0c10dd4db1d22b75d3a5b7dca5 Mon Sep 17 00:00:00 2001 From: Antonio Huete Jimenez Date: Sat, 29 Dec 2012 17:58:59 +0100 Subject: [PATCH] boot - Use ether_sprintf() where appropriate. %D is non standard and it is going to be removed soon. --- sys/boot/common/dev_net.c | 3 +-- sys/boot/pc32/libi386/pxe.c | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/boot/common/dev_net.c b/sys/boot/common/dev_net.c index 728204a3df..07c7d4a90d 100644 --- a/sys/boot/common/dev_net.c +++ b/sys/boot/common/dev_net.c @@ -289,11 +289,10 @@ net_getparams(sock) printf("net_open: server path: %s\n", rootpath); d = socktodesc(sock); - sprintf(temp, "%6D", d->myea, ":"); setenv("boot.netif.ip", inet_ntoa(myip), 1); setenv("boot.netif.netmask", intoa(netmask), 1); setenv("boot.netif.gateway", inet_ntoa(gateip), 1); - setenv("boot.netif.hwaddr", temp, 1); + setenv("boot.netif.hwaddr", ether_sprintf(d->myea), 1); setenv("boot.nfsroot.server", inet_ntoa(rootip), 1); setenv("boot.nfsroot.path", rootpath, 1); diff --git a/sys/boot/pc32/libi386/pxe.c b/sys/boot/pc32/libi386/pxe.c index 07cf1b575a..f35ca6ac50 100644 --- a/sys/boot/pc32/libi386/pxe.c +++ b/sys/boot/pc32/libi386/pxe.c @@ -306,10 +306,9 @@ pxe_open(struct open_file *f, ...) setenv("boot.netif.ip", inet_ntoa(myip), 1); setenv("boot.netif.netmask", intoa(netmask), 1); setenv("boot.netif.gateway", inet_ntoa(gateip), 1); - if (bootplayer.Hardware == ETHER_TYPE) { - sprintf(temp, "%6D", bootplayer.CAddr, ":"); - setenv("boot.netif.hwaddr", temp, 1); - } + if (bootplayer.Hardware == ETHER_TYPE) + setenv("boot.netif.hwaddr", ether_sprintf(bootplayer.CAddr), 1); + setenv("boot.nfsroot.server", inet_ntoa(rootip), 1); setenv("boot.nfsroot.path", rootpath, 1); } -- 2.11.4.GIT