From ee2f3c0d51cfdc1c3ceabdc197cd9a061db825df Mon Sep 17 00:00:00 2001 From: tol Date: Tue, 27 Mar 2007 13:26:58 +0000 Subject: [PATCH] remove knfs support --- nnpfs/bsd/Makefile.in | 2 +- nnpfs/bsd/nnpfs_vfsops-bsd.c | 84 +------------------------------------------- 2 files changed, 2 insertions(+), 84 deletions(-) diff --git a/nnpfs/bsd/Makefile.in b/nnpfs/bsd/Makefile.in index 8db0435d3..107974d1c 100644 --- a/nnpfs/bsd/Makefile.in +++ b/nnpfs/bsd/Makefile.in @@ -39,7 +39,7 @@ INCDEFS = -I. -I$(srcdir) \ -I../../include -I$(srcdir)/../../include \ -I$(srcdir)/../include -DEFS = @DEFS@ $(INCDEFS) -DNNPFS_DEBUG @ARLA_KNFS@ +DEFS = @DEFS@ $(INCDEFS) -DNNPFS_DEBUG CFLAGS = @CFLAGS@ @KERNEL_CFLAGS@ @KERNEL_CPPFLAGS@ -Wno-unused @BSD_WERROR@ SYS = @SYS@ diff --git a/nnpfs/bsd/nnpfs_vfsops-bsd.c b/nnpfs/bsd/nnpfs_vfsops-bsd.c index 18aa32599..c92aeac57 100644 --- a/nnpfs/bsd/nnpfs_vfsops-bsd.c +++ b/nnpfs/bsd/nnpfs_vfsops-bsd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995 - 2002, 2004 Kungliga Tekniska Högskolan + * Copyright (c) 1995-2002, 2004-2007 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -149,64 +149,7 @@ common_fhtovp(struct mount * mp, struct fid * fhp, struct vnode ** vpp) { -#ifdef ARLA_KNFS - struct netcred *np = NULL; - struct nnpfs_node *xn; - struct vnode *vp; - nnpfs_handle handle; - int error; - - NNPFSDEB(XDEBVFOPS, ("nnpfs_fhtovp\n")); - - if (fhp->fid_len != 16) { - printf("nnpfs_fhtovp: *PANIC* got a invalid length of a fid\n"); - return EINVAL; - } - - memcpy(&handle, fhp->fid_data, sizeof(handle)); - NNPFSDEB(XDEBVFOPS, ("nnpfs_fhtovp: fid: %d.%d.%d.%d\n", - handle.a, handle.d, handle.c, handle.d)); - - NNPFSDEB(XDEBVFOPS, ("nnpfs_fhtovp: nnpfs_vnode_find\n")); - error = nnpfs_node_find(&nnpfs_dev[0], &handle, &xn); - if (error == EISDIR) - return error; - - if (error == ENOENT) { - struct nnpfs_message_getattr msg; - - error = nnpfs_getnewvnode(nnpfs_dev[0].mp, &vp, &handle, NULL, curproc); - if (error) - return error; - - } else { - /* XXX access ? */ - vp = XNODE_TO_VNODE(xn); - - /* XXX wrong ? (we tell arla below) */ - if (vp->v_usecount <= 0) - nnpfs_do_vget(vp, 0, curproc); - else - VREF(vp); - error = 0; - } - - *vpp = vp; - - if (error == 0) { - NNPFSDEB(XDEBVFOPS, ("nnpfs_fhtovp done\n")); - - /* - * XXX tell arla about this node is hold by nfsd. - * There need to be code in nnpfs_write too. - */ - } else - NNPFSDEB(XDEBVFOPS, ("nnpfs_fhtovp failed (%d)\n", error)); - - return error; -#else /* !ARLA_KNFS */ return EOPNOTSUPP; -#endif /* !ARLA_KNFS */ } /* new style fhtovp */ @@ -290,33 +233,8 @@ nnpfs_vptofh(struct vnode * vp, #endif ) { -#ifdef ARLA_KNFS - struct nnpfs_node *xn; - NNPFSDEB(XDEBVFOPS, ("nnpfs_vptofh\n")); - -#if defined(__NetBSD__) && __NetBSD_Version__ >= 399002200 /* 3.99.22 */ - if (*fh_size < 16) { - *fh_size = 16; - return E2BIG; - } -#else - if (MAXFIDSZ < 16) - return EOPNOTSUPP; -#endif - - xn = VNODE_TO_XNODE(vp); - - if (xn == NULL) - return EINVAL; - - fhp->fid_len = 16; - memcpy(fhp->fid_data, &xn->handle, 16); - - return 0; -#else NNPFSDEB(XDEBVFOPS, ("nnpfs_vptofh\n")); return EOPNOTSUPP; -#endif } #endif /* !__APPLE__ */ -- 2.11.4.GIT