use our own NFS fs implementation, which is smaller, does a better job
in error reporting and coexists with the TFTP fs
This commit is contained in:
parent
8e04272b51
commit
ff28ac27ec
@ -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
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user