From ff28ac27ecc0b229de95d020a15e3260563429b3 Mon Sep 17 00:00:00 2001 From: drochner Date: Tue, 11 Mar 2003 15:01:51 +0000 Subject: [PATCH] use our own NFS fs implementation, which is smaller, does a better job in error reporting and coexists with the TFTP fs --- sys/arch/i386/stand/pxeboot/Makefile | 6 +++++- sys/arch/i386/stand/pxeboot/dev_net.c | 16 ++-------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/sys/arch/i386/stand/pxeboot/Makefile b/sys/arch/i386/stand/pxeboot/Makefile index 5618960d3e19..ce5f28044bc4 100644 --- a/sys/arch/i386/stand/pxeboot/Makefile +++ b/sys/arch/i386/stand/pxeboot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2002/11/24 23:48:48 lukem Exp $ +# $NetBSD: Makefile,v 1.5 2003/03/11 15:01:51 drochner Exp $ S= ${.CURDIR}/../../../../ @@ -15,6 +15,9 @@ RELOC= 0x0 .endif SRCS= main.c dev_net.c devopen.c conf.c exec.c pxe.c pxe_call.S +# use our own nfs implementation +.PATH: ${.CURDIR}/../libsa +SRCS+= nfs.c .if (${BASE} == "pxeboot_ia32") # Various serial line configurations @@ -34,6 +37,7 @@ CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL CPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP CPPFLAGS+= -DSUPPORT_TFTP CPPFLAGS+= -DSUPPORT_NFS +#CPPFLAGS+= -DNFS_NOSYMLINK CPPFLAGS+= -DPASS_MEMMAP diff --git a/sys/arch/i386/stand/pxeboot/dev_net.c b/sys/arch/i386/stand/pxeboot/dev_net.c index 682c84308274..164e5013f86f 100644 --- a/sys/arch/i386/stand/pxeboot/dev_net.c +++ b/sys/arch/i386/stand/pxeboot/dev_net.c @@ -1,4 +1,4 @@ -/* $NetBSD: dev_net.c,v 1.1 2002/02/16 16:26:23 thorpej Exp $ */ +/* $NetBSD: dev_net.c,v 1.2 2003/03/11 15:01:51 drochner Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -70,8 +70,6 @@ #include "bootparam.h" #include "dev_net.h" -extern int nfs_root_node[]; /* XXX - get from nfs_mount() */ - static int netdev_sock = -1; static int netdev_opens; @@ -115,24 +113,14 @@ net_open(struct open_file *f, ...) error = net_getparams(netdev_sock); if (error) { /* getparams makes its own noise */ - goto fail; - } - /* Get the NFS file handle (mountd). */ - error = nfs_mount(netdev_sock, rootip, rootpath); - if (error) { - printf("net_open: NFS mount error=%d\n", error); - rootip.s_addr = 0; - fail: netif_close(netdev_sock); netdev_sock = -1; return (error); } - if (debug) - printf("net_open: NFS mount succeeded\n"); } } netdev_opens++; - f->f_devdata = nfs_root_node; + f->f_devdata = &netdev_sock; return (error); }