summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libstand/Makefile6
-rw-r--r--sys/boot/i386/libi386/pxe.c10
2 files changed, 7 insertions, 9 deletions
diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile
index 75e95af..7d2a2ca 100644
--- a/lib/libstand/Makefile
+++ b/lib/libstand/Makefile
@@ -93,10 +93,6 @@ __reml.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
${.ALLSRC} > ${.TARGET}
.endif
-# network support from libc
-.PATH: ${.CURDIR}/../libc/net
-SRCS+= inet_ntoa.c inet_addr.c
-
# _setjmp/_longjmp
.PATH: ${.CURDIR}/${MACHINE_ARCH}
SRCS+= _setjmp.S
@@ -114,7 +110,7 @@ SRCS+= closeall.c dev.c ioctl.c nullfs.c stat.c \
fstat.c close.c lseek.c open.c read.c write.c readdir.c
# network routines
-SRCS+= arp.c ether.c in_cksum.c net.c udp.c netif.c rpc.c
+SRCS+= arp.c ether.c inet_ntoa.c in_cksum.c net.c udp.c netif.c rpc.c
# network info services:
SRCS+= bootp.c rarp.c bootparam.c
diff --git a/sys/boot/i386/libi386/pxe.c b/sys/boot/i386/libi386/pxe.c
index 8391bb8..5cbf545 100644
--- a/sys/boot/i386/libi386/pxe.c
+++ b/sys/boot/i386/libi386/pxe.c
@@ -286,11 +286,13 @@ pxe_open(struct open_file *f, ...)
if (!rootpath[1])
strcpy(rootpath, PXENFSROOTPATH);
- for(i=0; i<FNAME_SIZE; i++)
- if(rootpath[i] == ':')
+ for (i = 0; i < FNAME_SIZE; i++)
+ if (rootpath[i] == ':')
break;
- if(i && i != FNAME_SIZE) {
- i++;
+ if (i && i != FNAME_SIZE) {
+ rootpath[i++] = '\0';
+ if (inet_addr(&rootpath[0]) != INADDR_NONE)
+ rootip.s_addr = inet_addr(&rootpath[0]);
bcopy(&rootpath[i], &temp[0], strlen(&rootpath[i])+1);
bcopy(&temp[0], &rootpath[0], strlen(&rootpath[i])+1);
}
OpenPOWER on IntegriCloud