summaryrefslogtreecommitdiff
path: root/lib/libstand
diff options
context:
space:
mode:
authorPaul Saab <ps@FreeBSD.org>2000-05-01 11:00:42 +0000
committerPaul Saab <ps@FreeBSD.org>2000-05-01 11:00:42 +0000
commit5f1c06922af3e1bf23b6a350e71d259abf698bdd (patch)
treec6b562bf43c3da3508ae164b7416df5fd02e80ac /lib/libstand
parent9c8127832be6c64db860d8fa3a95706604d0a10d (diff)
Notes
Diffstat (limited to 'lib/libstand')
-rw-r--r--lib/libstand/nfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libstand/nfs.c b/lib/libstand/nfs.c
index 7b0e783e617d..26ffad8fb659 100644
--- a/lib/libstand/nfs.c
+++ b/lib/libstand/nfs.c
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
/* $NetBSD: nfs.c,v 1.2 1998/01/24 12:43:09 drochner Exp $ */
/*-
@@ -108,6 +109,8 @@ static int nfs_write(struct open_file *f, void *buf, size_t size, size_t *resid)
static off_t nfs_seek(struct open_file *f, off_t offset, int where);
static int nfs_stat(struct open_file *f, struct stat *sb);
+static struct nfs_iodesc nfs_root_node;
+
struct fs_ops nfs_fsops = {
"nfs", nfs_open, nfs_close, nfs_read, nfs_write, nfs_seek, nfs_stat
};
@@ -356,7 +359,6 @@ nfs_open(upath, f)
const char *upath;
struct open_file *f;
{
- static struct nfs_iodesc nfs_root_node;
struct iodesc *desc;
struct nfs_iodesc *currfd;
#ifndef NFS_NOSYMLINK
@@ -539,7 +541,7 @@ nfs_close(f)
printf("nfs_close: fp=0x%lx\n", (u_long)fp);
#endif
- if (fp)
+ if (fp != &nfs_root_node && fp)
free(fp);
f->f_fsdata = (void *)0;