1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 |
37 * $Id: nfs_vnops.c,v 1.92 1998/05/31 17:27:55 peter Exp $ |
38 */ 39 40 41/* 42 * vnode op calls for Sun NFS version 2 and 3 43 */ 44 45#include "opt_inet.h" --- 71 unchanged lines hidden (view full) --- 117static int nfs_link __P((struct vop_link_args *)); 118static int nfs_rename __P((struct vop_rename_args *)); 119static int nfs_mkdir __P((struct vop_mkdir_args *)); 120static int nfs_rmdir __P((struct vop_rmdir_args *)); 121static int nfs_symlink __P((struct vop_symlink_args *)); 122static int nfs_readdir __P((struct vop_readdir_args *)); 123static int nfs_bmap __P((struct vop_bmap_args *)); 124static int nfs_strategy __P((struct vop_strategy_args *)); |
125static int nfs_lookitup __P((struct vnode *, const char *, int, 126 struct ucred *, struct proc *, struct nfsnode **)); |
127static int nfs_sillyrename __P((struct vnode *,struct vnode *,struct componentname *)); 128static int nfsspec_access __P((struct vop_access_args *)); 129static int nfs_readlink __P((struct vop_readlink_args *)); 130static int nfs_print __P((struct vop_print_args *)); 131static int nfs_advlock __P((struct vop_advlock_args *)); 132static int nfs_bwrite __P((struct vop_bwrite_args *)); 133/* 134 * Global vfs data structures for nfs --- 83 unchanged lines hidden (view full) --- 218 { &fifo_nfsv2nodeop_p, nfsv2_fifoop_entries }; 219VNODEOP_SET(fifo_nfsv2nodeop_opv_desc); 220 221static int nfs_commit __P((struct vnode *vp, u_quad_t offset, int cnt, 222 struct ucred *cred, struct proc *procp)); 223static int nfs_mknodrpc __P((struct vnode *dvp, struct vnode **vpp, 224 struct componentname *cnp, 225 struct vattr *vap)); |
226static int nfs_removerpc __P((struct vnode *dvp, const char *name, 227 int namelen, |
228 struct ucred *cred, struct proc *proc)); |
229static int nfs_renamerpc __P((struct vnode *fdvp, const char *fnameptr, |
230 int fnamelen, struct vnode *tdvp, |
231 const char *tnameptr, int tnamelen, |
232 struct ucred *cred, struct proc *proc)); 233static int nfs_renameit __P((struct vnode *sdvp, 234 struct componentname *scnp, 235 struct sillyrename *sp)); 236 237/* 238 * Global variables 239 */ --- 1253 unchanged lines hidden (view full) --- 1493} 1494 1495/* 1496 * Nfs remove rpc, called from nfs_remove() and nfs_removeit(). 1497 */ 1498static int 1499nfs_removerpc(dvp, name, namelen, cred, proc) 1500 register struct vnode *dvp; |
1501 const char *name; |
1502 int namelen; 1503 struct ucred *cred; 1504 struct proc *proc; 1505{ 1506 register u_long *tl; 1507 register caddr_t cp; 1508 register long t1, t2; 1509 caddr_t bpos, dpos, cp2; --- 101 unchanged lines hidden (view full) --- 1611} 1612 1613/* 1614 * Do an nfs rename rpc. Called from nfs_rename() and nfs_renameit(). 1615 */ 1616static int 1617nfs_renamerpc(fdvp, fnameptr, fnamelen, tdvp, tnameptr, tnamelen, cred, proc) 1618 register struct vnode *fdvp; |
1619 const char *fnameptr; |
1620 int fnamelen; 1621 register struct vnode *tdvp; |
1622 const char *tnameptr; |
1623 int tnamelen; 1624 struct ucred *cred; 1625 struct proc *proc; 1626{ 1627 register u_long *tl; 1628 register caddr_t cp; 1629 register long t1, t2; 1630 caddr_t bpos, dpos, cp2; --- 814 unchanged lines hidden (view full) --- 2445 * npp == NULL --> just do the lookup 2446 * *npp == NULL --> allocate a new nfsnode and make sure attributes are 2447 * handled too 2448 * *npp != NULL --> update the file handle in the vnode 2449 */ 2450static int 2451nfs_lookitup(dvp, name, len, cred, procp, npp) 2452 register struct vnode *dvp; |
2453 const char *name; |
2454 int len; 2455 struct ucred *cred; 2456 struct proc *procp; 2457 struct nfsnode **npp; 2458{ 2459 register u_long *tl; 2460 register caddr_t cp; 2461 register long t1, t2; --- 816 unchanged lines hidden --- |