Get rid from the legacy __P() macro. Remove 'register' keywords.
This commit is contained in:
parent
63c8580965
commit
72e68d3b76
@ -197,8 +197,8 @@ nwfs_readvnode(struct vnode *vp, struct uio *uiop, struct ucred *cred) {
|
||||
|
||||
int
|
||||
nwfs_writevnode(vp, uiop, cred, ioflag)
|
||||
register struct vnode *vp;
|
||||
register struct uio *uiop;
|
||||
struct vnode *vp;
|
||||
struct uio *uiop;
|
||||
struct ucred *cred;
|
||||
int ioflag;
|
||||
{
|
||||
@ -256,12 +256,12 @@ nwfs_writevnode(vp, uiop, cred, ioflag)
|
||||
*/
|
||||
int
|
||||
nwfs_doio(bp, cr, p)
|
||||
register struct buf *bp;
|
||||
struct buf *bp;
|
||||
struct ucred *cr;
|
||||
struct proc *p;
|
||||
{
|
||||
register struct uio *uiop;
|
||||
register struct vnode *vp;
|
||||
struct uio *uiop;
|
||||
struct vnode *vp;
|
||||
struct nwnode *np;
|
||||
struct nwmount *nmp;
|
||||
int error = 0;
|
||||
@ -591,7 +591,7 @@ nwfs_vinvalbuf(vp, flags, cred, p, intrflg)
|
||||
struct proc *p;
|
||||
int intrflg;
|
||||
{
|
||||
register struct nwnode *np = VTONW(vp);
|
||||
struct nwnode *np = VTONW(vp);
|
||||
/* struct nwmount *nmp = VTONWFS(vp);*/
|
||||
int error = 0, slpflag, slptimeo;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, Boris Popov
|
||||
* Copyright (c) 1999, 2000 Boris Popov
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -76,17 +76,20 @@ SYSCTL_PROC(_vfs_nwfs, OID_AUTO, vnprint, CTLFLAG_WR|CTLTYPE_OPAQUE,
|
||||
NULL, 0, nwfs_sysctl_vnprint, "S,vnlist", "vnode hash");
|
||||
|
||||
void
|
||||
nwfs_hash_init(void) {
|
||||
nwfs_hash_init(void)
|
||||
{
|
||||
nwhashtbl = hashinit(desiredvnodes, M_NWFSHASH, &nwnodehash);
|
||||
}
|
||||
|
||||
void
|
||||
nwfs_hash_free(void) {
|
||||
nwfs_hash_free(void)
|
||||
{
|
||||
free(nwhashtbl, M_NWFSHASH);
|
||||
}
|
||||
|
||||
int
|
||||
nwfs_sysctl_vnprint(SYSCTL_HANDLER_ARGS) {
|
||||
nwfs_sysctl_vnprint(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
struct nwnode *np;
|
||||
struct nwnode_hash_head *nhpp;
|
||||
struct vnode *vp;
|
||||
@ -111,7 +114,8 @@ nwfs_sysctl_vnprint(SYSCTL_HANDLER_ARGS) {
|
||||
* Vnode referenced and not locked.
|
||||
*/
|
||||
int
|
||||
nwfs_allocvp(struct mount *mp, ncpfid fid, struct vnode **vpp) {
|
||||
nwfs_allocvp(struct mount *mp, ncpfid fid, struct vnode **vpp)
|
||||
{
|
||||
struct proc *p = curproc; /* XXX */
|
||||
struct nwnode *np, *np2;
|
||||
struct nwnode_hash_head *nhpp;
|
||||
@ -181,7 +185,8 @@ loop:
|
||||
}
|
||||
|
||||
int
|
||||
nwfs_lookupnp(struct nwmount *nmp, ncpfid fid, struct nwnode **npp) {
|
||||
nwfs_lookupnp(struct nwmount *nmp, ncpfid fid, struct nwnode **npp)
|
||||
{
|
||||
struct nwnode *np;
|
||||
struct nwnode_hash_head *nhpp;
|
||||
|
||||
@ -257,10 +262,11 @@ nwfs_inactive(ap)
|
||||
* nwfs_attr_cacheenter: unpack np.i to va structure
|
||||
*/
|
||||
void
|
||||
nwfs_attr_cacheenter(struct vnode *vp, struct nw_entry_info *fi) {
|
||||
nwfs_attr_cacheenter(struct vnode *vp, struct nw_entry_info *fi)
|
||||
{
|
||||
struct nwnode *np = VTONW(vp);
|
||||
struct nwmount *nmp = VTONWFS(vp);
|
||||
register struct vattr *va = &np->n_vattr;
|
||||
struct vattr *va = &np->n_vattr;
|
||||
|
||||
va->va_type = vp->v_type; /* vnode type (for create) */
|
||||
if (vp->v_type == VREG) {
|
||||
@ -303,7 +309,8 @@ nwfs_attr_cacheenter(struct vnode *vp, struct nw_entry_info *fi) {
|
||||
}
|
||||
|
||||
int
|
||||
nwfs_attr_cachelookup(struct vnode *vp, struct vattr *va) {
|
||||
nwfs_attr_cachelookup(struct vnode *vp, struct vattr *va)
|
||||
{
|
||||
struct nwnode *np = VTONW(vp);
|
||||
int diff;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, Boris Popov
|
||||
* Copyright (c) 1999, 2000 Boris Popov
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -86,13 +86,13 @@ void nwfs_hash_init(void);
|
||||
void nwfs_hash_free(void);
|
||||
int nwfs_allocvp(struct mount *mp, ncpfid fid, struct vnode **vpp);
|
||||
int nwfs_lookupnp(struct nwmount *nmp, ncpfid fid, struct nwnode **npp);
|
||||
int nwfs_inactive __P((struct vop_inactive_args *));
|
||||
int nwfs_reclaim __P((struct vop_reclaim_args *));
|
||||
int nwfs_inactive(struct vop_inactive_args *);
|
||||
int nwfs_reclaim(struct vop_reclaim_args *);
|
||||
int nwfs_nget(struct mount *mp, ncpfid fid, struct nw_entry_info *fap,
|
||||
struct vnode *dvp, struct vnode **vpp);
|
||||
|
||||
int nwfs_getpages __P((struct vop_getpages_args *));
|
||||
int nwfs_putpages __P((struct vop_putpages_args *));
|
||||
int nwfs_getpages(struct vop_getpages_args *);
|
||||
int nwfs_putpages(struct vop_putpages_args *);
|
||||
int nwfs_readvnode(struct vnode *vp, struct uio *uiop, struct ucred *cred);
|
||||
int nwfs_writevnode(struct vnode *vp, struct uio *uiop, struct ucred *cred, int ioflag);
|
||||
void nwfs_attr_cacheenter(struct vnode *vp, struct nw_entry_info *fi);
|
||||
|
@ -351,8 +351,8 @@ ncp_modify_file_or_subdir_dos_info(struct nwmount *nmp, struct vnode *vp,
|
||||
|
||||
int
|
||||
ncp_setattr(vp, vap, cred, procp)
|
||||
register struct vnode *vp;
|
||||
register struct vattr *vap;
|
||||
struct vnode *vp;
|
||||
struct vattr *vap;
|
||||
struct ucred *cred;
|
||||
struct proc *procp;
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, Boris Popov
|
||||
* Copyright (c) 1999, 2000 Boris Popov
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -69,19 +69,16 @@ SYSCTL_INT(_vfs_nwfs, OID_AUTO, debuglevel, CTLFLAG_RW, &nwfs_debuglevel, 0, "")
|
||||
|
||||
MODULE_DEPEND(nwfs, ncp, 1, 1, 1);
|
||||
|
||||
static int nwfs_mount __P((struct mount *, char *, caddr_t,
|
||||
struct nameidata *, struct proc *));
|
||||
static int nwfs_quotactl __P((struct mount *, int, uid_t, caddr_t,
|
||||
struct proc *));
|
||||
static int nwfs_root __P((struct mount *, struct vnode **));
|
||||
static int nwfs_start __P((struct mount *, int, struct proc *));
|
||||
static int nwfs_statfs __P((struct mount *, struct statfs *,
|
||||
struct proc *));
|
||||
static int nwfs_sync __P((struct mount *, int, struct ucred *,
|
||||
struct proc *));
|
||||
static int nwfs_unmount __P((struct mount *, int, struct proc *));
|
||||
static int nwfs_init __P((struct vfsconf *vfsp));
|
||||
static int nwfs_uninit __P((struct vfsconf *vfsp));
|
||||
static int nwfs_mount(struct mount *, char *, caddr_t,
|
||||
struct nameidata *, struct proc *);
|
||||
static int nwfs_quotactl(struct mount *, int, uid_t, caddr_t, struct proc *);
|
||||
static int nwfs_root(struct mount *, struct vnode **);
|
||||
static int nwfs_start(struct mount *, int, struct proc *);
|
||||
static int nwfs_statfs(struct mount *, struct statfs *, struct proc *);
|
||||
static int nwfs_sync(struct mount *, int, struct ucred *, struct proc *);
|
||||
static int nwfs_unmount(struct mount *, int, struct proc *);
|
||||
static int nwfs_init(struct vfsconf *vfsp);
|
||||
static int nwfs_uninit(struct vfsconf *vfsp);
|
||||
|
||||
static struct vfsops nwfs_vfsops = {
|
||||
nwfs_mount,
|
||||
@ -446,7 +443,7 @@ nwfs_uninit(struct vfsconf *vfsp)
|
||||
int
|
||||
nwfs_statfs(mp, sbp, p)
|
||||
struct mount *mp;
|
||||
register struct statfs *sbp;
|
||||
struct statfs *sbp;
|
||||
struct proc *p;
|
||||
{
|
||||
struct nwmount *nmp = VFSTONWFS(mp);
|
||||
@ -496,7 +493,7 @@ nwfs_sync(mp, waitfor, cred, p)
|
||||
struct ucred *cred;
|
||||
struct proc *p;
|
||||
{
|
||||
register struct vnode *vp;
|
||||
struct vnode *vp;
|
||||
int error, allerror = 0;
|
||||
/*
|
||||
* Force stale buffer cache information to be flushed.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, Boris Popov
|
||||
* Copyright (c) 1999, 2000 Boris Popov
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -59,28 +59,28 @@
|
||||
/*
|
||||
* Prototypes for NWFS vnode operations
|
||||
*/
|
||||
static int nwfs_create __P((struct vop_create_args *));
|
||||
static int nwfs_mknod __P((struct vop_mknod_args *));
|
||||
static int nwfs_open __P((struct vop_open_args *));
|
||||
static int nwfs_close __P((struct vop_close_args *));
|
||||
static int nwfs_access __P((struct vop_access_args *));
|
||||
static int nwfs_getattr __P((struct vop_getattr_args *));
|
||||
static int nwfs_setattr __P((struct vop_setattr_args *));
|
||||
static int nwfs_read __P((struct vop_read_args *));
|
||||
static int nwfs_write __P((struct vop_write_args *));
|
||||
static int nwfs_fsync __P((struct vop_fsync_args *));
|
||||
static int nwfs_remove __P((struct vop_remove_args *));
|
||||
static int nwfs_link __P((struct vop_link_args *));
|
||||
static int nwfs_lookup __P((struct vop_lookup_args *));
|
||||
static int nwfs_rename __P((struct vop_rename_args *));
|
||||
static int nwfs_mkdir __P((struct vop_mkdir_args *));
|
||||
static int nwfs_rmdir __P((struct vop_rmdir_args *));
|
||||
static int nwfs_symlink __P((struct vop_symlink_args *));
|
||||
static int nwfs_readdir __P((struct vop_readdir_args *));
|
||||
static int nwfs_bmap __P((struct vop_bmap_args *));
|
||||
static int nwfs_strategy __P((struct vop_strategy_args *));
|
||||
static int nwfs_print __P((struct vop_print_args *));
|
||||
static int nwfs_pathconf __P((struct vop_pathconf_args *ap));
|
||||
static int nwfs_create(struct vop_create_args *);
|
||||
static int nwfs_mknod(struct vop_mknod_args *);
|
||||
static int nwfs_open(struct vop_open_args *);
|
||||
static int nwfs_close(struct vop_close_args *);
|
||||
static int nwfs_access(struct vop_access_args *);
|
||||
static int nwfs_getattr(struct vop_getattr_args *);
|
||||
static int nwfs_setattr(struct vop_setattr_args *);
|
||||
static int nwfs_read(struct vop_read_args *);
|
||||
static int nwfs_write(struct vop_write_args *);
|
||||
static int nwfs_fsync(struct vop_fsync_args *);
|
||||
static int nwfs_remove(struct vop_remove_args *);
|
||||
static int nwfs_link(struct vop_link_args *);
|
||||
static int nwfs_lookup(struct vop_lookup_args *);
|
||||
static int nwfs_rename(struct vop_rename_args *);
|
||||
static int nwfs_mkdir(struct vop_mkdir_args *);
|
||||
static int nwfs_rmdir(struct vop_rmdir_args *);
|
||||
static int nwfs_symlink(struct vop_symlink_args *);
|
||||
static int nwfs_readdir(struct vop_readdir_args *);
|
||||
static int nwfs_bmap(struct vop_bmap_args *);
|
||||
static int nwfs_strategy(struct vop_strategy_args *);
|
||||
static int nwfs_print(struct vop_print_args *);
|
||||
static int nwfs_pathconf(struct vop_pathconf_args *ap);
|
||||
|
||||
/* Global vfs data structures for nwfs */
|
||||
vop_t **nwfs_vnodeop_p;
|
||||
@ -144,7 +144,7 @@ nwfs_access(ap)
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct ucred *cred = ap->a_cred;
|
||||
u_int mode = ap->a_mode;
|
||||
struct nwmount *nmp = VTONWFS(vp);
|
||||
@ -182,7 +182,7 @@ nwfs_open(ap)
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
int mode = ap->a_mode;
|
||||
struct nwnode *np = VTONW(vp);
|
||||
struct ncp_open_info no;
|
||||
@ -247,8 +247,8 @@ nwfs_close(ap)
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct nwnode *np = VTONW(vp);
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct nwnode *np = VTONW(vp);
|
||||
int error;
|
||||
|
||||
NCPVNDEBUG("name=%s,pid=%d,c=%d\n",np->n_name,ap->a_p->p_pid,np->opened);
|
||||
@ -287,8 +287,8 @@ nwfs_getattr(ap)
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct nwnode *np = VTONW(vp);
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct nwnode *np = VTONW(vp);
|
||||
struct vattr *va=ap->a_vap;
|
||||
struct nwmount *nmp = VTONWFS(vp);
|
||||
struct nw_entry_info fattr;
|
||||
@ -329,9 +329,9 @@ nwfs_setattr(ap)
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct nwnode *np = VTONW(vp);
|
||||
register struct vattr *vap = ap->a_vap;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct nwnode *np = VTONW(vp);
|
||||
struct vattr *vap = ap->a_vap;
|
||||
u_quad_t tsize=0;
|
||||
int error = 0;
|
||||
|
||||
@ -386,7 +386,7 @@ nwfs_read(ap)
|
||||
struct ucred *a_cred;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct uio *uio=ap->a_uio;
|
||||
int error;
|
||||
NCPVNDEBUG("nwfs_read:\n");
|
||||
@ -406,7 +406,7 @@ nwfs_write(ap)
|
||||
struct ucred *a_cred;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct uio *uio = ap->a_uio;
|
||||
int error;
|
||||
|
||||
@ -433,10 +433,10 @@ nwfs_create(ap)
|
||||
struct vattr *a_vap;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *dvp = ap->a_dvp;
|
||||
register struct vattr *vap = ap->a_vap;
|
||||
struct vnode *dvp = ap->a_dvp;
|
||||
struct vattr *vap = ap->a_vap;
|
||||
struct vnode **vpp=ap->a_vpp;
|
||||
register struct componentname *cnp = ap->a_cnp;
|
||||
struct componentname *cnp = ap->a_cnp;
|
||||
struct vnode *vp = (struct vnode *)0;
|
||||
int error = 0, fmode;
|
||||
struct vattr vattr;
|
||||
@ -489,10 +489,10 @@ nwfs_remove(ap)
|
||||
struct componentname * a_cnp;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct vnode *dvp = ap->a_dvp;
|
||||
register struct componentname *cnp = ap->a_cnp;
|
||||
register struct nwnode *np = VTONW(vp);
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct vnode *dvp = ap->a_dvp;
|
||||
struct componentname *cnp = ap->a_cnp;
|
||||
struct nwnode *np = VTONW(vp);
|
||||
struct nwmount *nmp = VTONWFS(vp);
|
||||
int error;
|
||||
|
||||
@ -523,12 +523,12 @@ nwfs_rename(ap)
|
||||
struct componentname *a_tcnp;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *fvp = ap->a_fvp;
|
||||
register struct vnode *tvp = ap->a_tvp;
|
||||
register struct vnode *fdvp = ap->a_fdvp;
|
||||
register struct vnode *tdvp = ap->a_tdvp;
|
||||
register struct componentname *tcnp = ap->a_tcnp;
|
||||
register struct componentname *fcnp = ap->a_fcnp;
|
||||
struct vnode *fvp = ap->a_fvp;
|
||||
struct vnode *tvp = ap->a_tvp;
|
||||
struct vnode *fdvp = ap->a_fdvp;
|
||||
struct vnode *tdvp = ap->a_tdvp;
|
||||
struct componentname *tcnp = ap->a_tcnp;
|
||||
struct componentname *fcnp = ap->a_fcnp;
|
||||
struct nwmount *nmp=VTONWFS(fvp);
|
||||
u_int16_t oldtype = 6;
|
||||
int error=0;
|
||||
@ -648,10 +648,10 @@ nwfs_mkdir(ap)
|
||||
struct vattr *a_vap;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *dvp = ap->a_dvp;
|
||||
/* register struct vattr *vap = ap->a_vap;*/
|
||||
register struct componentname *cnp = ap->a_cnp;
|
||||
register int len=cnp->cn_namelen;
|
||||
struct vnode *dvp = ap->a_dvp;
|
||||
/* struct vattr *vap = ap->a_vap;*/
|
||||
struct componentname *cnp = ap->a_cnp;
|
||||
int len=cnp->cn_namelen;
|
||||
struct ncp_open_info no;
|
||||
struct nwnode *np;
|
||||
struct vnode *newvp = (struct vnode *)0;
|
||||
@ -697,9 +697,9 @@ nwfs_rmdir(ap)
|
||||
struct componentname *a_cnp;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct vnode *dvp = ap->a_dvp;
|
||||
register struct componentname *cnp = ap->a_cnp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct vnode *dvp = ap->a_dvp;
|
||||
struct componentname *cnp = ap->a_cnp;
|
||||
struct nwmount *nmp = VTONWFS(vp);
|
||||
struct nwnode *dnp = VTONW(dvp);
|
||||
int error = EIO;
|
||||
@ -731,8 +731,8 @@ nwfs_readdir(ap)
|
||||
int a_ncookies;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct uio *uio = ap->a_uio;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct uio *uio = ap->a_uio;
|
||||
int error;
|
||||
|
||||
if (vp->v_type != VDIR)
|
||||
@ -837,7 +837,7 @@ nwfs_bmap(ap)
|
||||
int *a_runb;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
|
||||
if (ap->a_vpp != NULL)
|
||||
*ap->a_vpp = vp;
|
||||
|
@ -197,8 +197,8 @@ nwfs_readvnode(struct vnode *vp, struct uio *uiop, struct ucred *cred) {
|
||||
|
||||
int
|
||||
nwfs_writevnode(vp, uiop, cred, ioflag)
|
||||
register struct vnode *vp;
|
||||
register struct uio *uiop;
|
||||
struct vnode *vp;
|
||||
struct uio *uiop;
|
||||
struct ucred *cred;
|
||||
int ioflag;
|
||||
{
|
||||
@ -256,12 +256,12 @@ nwfs_writevnode(vp, uiop, cred, ioflag)
|
||||
*/
|
||||
int
|
||||
nwfs_doio(bp, cr, p)
|
||||
register struct buf *bp;
|
||||
struct buf *bp;
|
||||
struct ucred *cr;
|
||||
struct proc *p;
|
||||
{
|
||||
register struct uio *uiop;
|
||||
register struct vnode *vp;
|
||||
struct uio *uiop;
|
||||
struct vnode *vp;
|
||||
struct nwnode *np;
|
||||
struct nwmount *nmp;
|
||||
int error = 0;
|
||||
@ -591,7 +591,7 @@ nwfs_vinvalbuf(vp, flags, cred, p, intrflg)
|
||||
struct proc *p;
|
||||
int intrflg;
|
||||
{
|
||||
register struct nwnode *np = VTONW(vp);
|
||||
struct nwnode *np = VTONW(vp);
|
||||
/* struct nwmount *nmp = VTONWFS(vp);*/
|
||||
int error = 0, slpflag, slptimeo;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, Boris Popov
|
||||
* Copyright (c) 1999, 2000 Boris Popov
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -76,17 +76,20 @@ SYSCTL_PROC(_vfs_nwfs, OID_AUTO, vnprint, CTLFLAG_WR|CTLTYPE_OPAQUE,
|
||||
NULL, 0, nwfs_sysctl_vnprint, "S,vnlist", "vnode hash");
|
||||
|
||||
void
|
||||
nwfs_hash_init(void) {
|
||||
nwfs_hash_init(void)
|
||||
{
|
||||
nwhashtbl = hashinit(desiredvnodes, M_NWFSHASH, &nwnodehash);
|
||||
}
|
||||
|
||||
void
|
||||
nwfs_hash_free(void) {
|
||||
nwfs_hash_free(void)
|
||||
{
|
||||
free(nwhashtbl, M_NWFSHASH);
|
||||
}
|
||||
|
||||
int
|
||||
nwfs_sysctl_vnprint(SYSCTL_HANDLER_ARGS) {
|
||||
nwfs_sysctl_vnprint(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
struct nwnode *np;
|
||||
struct nwnode_hash_head *nhpp;
|
||||
struct vnode *vp;
|
||||
@ -111,7 +114,8 @@ nwfs_sysctl_vnprint(SYSCTL_HANDLER_ARGS) {
|
||||
* Vnode referenced and not locked.
|
||||
*/
|
||||
int
|
||||
nwfs_allocvp(struct mount *mp, ncpfid fid, struct vnode **vpp) {
|
||||
nwfs_allocvp(struct mount *mp, ncpfid fid, struct vnode **vpp)
|
||||
{
|
||||
struct proc *p = curproc; /* XXX */
|
||||
struct nwnode *np, *np2;
|
||||
struct nwnode_hash_head *nhpp;
|
||||
@ -181,7 +185,8 @@ loop:
|
||||
}
|
||||
|
||||
int
|
||||
nwfs_lookupnp(struct nwmount *nmp, ncpfid fid, struct nwnode **npp) {
|
||||
nwfs_lookupnp(struct nwmount *nmp, ncpfid fid, struct nwnode **npp)
|
||||
{
|
||||
struct nwnode *np;
|
||||
struct nwnode_hash_head *nhpp;
|
||||
|
||||
@ -257,10 +262,11 @@ nwfs_inactive(ap)
|
||||
* nwfs_attr_cacheenter: unpack np.i to va structure
|
||||
*/
|
||||
void
|
||||
nwfs_attr_cacheenter(struct vnode *vp, struct nw_entry_info *fi) {
|
||||
nwfs_attr_cacheenter(struct vnode *vp, struct nw_entry_info *fi)
|
||||
{
|
||||
struct nwnode *np = VTONW(vp);
|
||||
struct nwmount *nmp = VTONWFS(vp);
|
||||
register struct vattr *va = &np->n_vattr;
|
||||
struct vattr *va = &np->n_vattr;
|
||||
|
||||
va->va_type = vp->v_type; /* vnode type (for create) */
|
||||
if (vp->v_type == VREG) {
|
||||
@ -303,7 +309,8 @@ nwfs_attr_cacheenter(struct vnode *vp, struct nw_entry_info *fi) {
|
||||
}
|
||||
|
||||
int
|
||||
nwfs_attr_cachelookup(struct vnode *vp, struct vattr *va) {
|
||||
nwfs_attr_cachelookup(struct vnode *vp, struct vattr *va)
|
||||
{
|
||||
struct nwnode *np = VTONW(vp);
|
||||
int diff;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, Boris Popov
|
||||
* Copyright (c) 1999, 2000 Boris Popov
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -86,13 +86,13 @@ void nwfs_hash_init(void);
|
||||
void nwfs_hash_free(void);
|
||||
int nwfs_allocvp(struct mount *mp, ncpfid fid, struct vnode **vpp);
|
||||
int nwfs_lookupnp(struct nwmount *nmp, ncpfid fid, struct nwnode **npp);
|
||||
int nwfs_inactive __P((struct vop_inactive_args *));
|
||||
int nwfs_reclaim __P((struct vop_reclaim_args *));
|
||||
int nwfs_inactive(struct vop_inactive_args *);
|
||||
int nwfs_reclaim(struct vop_reclaim_args *);
|
||||
int nwfs_nget(struct mount *mp, ncpfid fid, struct nw_entry_info *fap,
|
||||
struct vnode *dvp, struct vnode **vpp);
|
||||
|
||||
int nwfs_getpages __P((struct vop_getpages_args *));
|
||||
int nwfs_putpages __P((struct vop_putpages_args *));
|
||||
int nwfs_getpages(struct vop_getpages_args *);
|
||||
int nwfs_putpages(struct vop_putpages_args *);
|
||||
int nwfs_readvnode(struct vnode *vp, struct uio *uiop, struct ucred *cred);
|
||||
int nwfs_writevnode(struct vnode *vp, struct uio *uiop, struct ucred *cred, int ioflag);
|
||||
void nwfs_attr_cacheenter(struct vnode *vp, struct nw_entry_info *fi);
|
||||
|
@ -351,8 +351,8 @@ ncp_modify_file_or_subdir_dos_info(struct nwmount *nmp, struct vnode *vp,
|
||||
|
||||
int
|
||||
ncp_setattr(vp, vap, cred, procp)
|
||||
register struct vnode *vp;
|
||||
register struct vattr *vap;
|
||||
struct vnode *vp;
|
||||
struct vattr *vap;
|
||||
struct ucred *cred;
|
||||
struct proc *procp;
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, Boris Popov
|
||||
* Copyright (c) 1999, 2000 Boris Popov
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -69,19 +69,16 @@ SYSCTL_INT(_vfs_nwfs, OID_AUTO, debuglevel, CTLFLAG_RW, &nwfs_debuglevel, 0, "")
|
||||
|
||||
MODULE_DEPEND(nwfs, ncp, 1, 1, 1);
|
||||
|
||||
static int nwfs_mount __P((struct mount *, char *, caddr_t,
|
||||
struct nameidata *, struct proc *));
|
||||
static int nwfs_quotactl __P((struct mount *, int, uid_t, caddr_t,
|
||||
struct proc *));
|
||||
static int nwfs_root __P((struct mount *, struct vnode **));
|
||||
static int nwfs_start __P((struct mount *, int, struct proc *));
|
||||
static int nwfs_statfs __P((struct mount *, struct statfs *,
|
||||
struct proc *));
|
||||
static int nwfs_sync __P((struct mount *, int, struct ucred *,
|
||||
struct proc *));
|
||||
static int nwfs_unmount __P((struct mount *, int, struct proc *));
|
||||
static int nwfs_init __P((struct vfsconf *vfsp));
|
||||
static int nwfs_uninit __P((struct vfsconf *vfsp));
|
||||
static int nwfs_mount(struct mount *, char *, caddr_t,
|
||||
struct nameidata *, struct proc *);
|
||||
static int nwfs_quotactl(struct mount *, int, uid_t, caddr_t, struct proc *);
|
||||
static int nwfs_root(struct mount *, struct vnode **);
|
||||
static int nwfs_start(struct mount *, int, struct proc *);
|
||||
static int nwfs_statfs(struct mount *, struct statfs *, struct proc *);
|
||||
static int nwfs_sync(struct mount *, int, struct ucred *, struct proc *);
|
||||
static int nwfs_unmount(struct mount *, int, struct proc *);
|
||||
static int nwfs_init(struct vfsconf *vfsp);
|
||||
static int nwfs_uninit(struct vfsconf *vfsp);
|
||||
|
||||
static struct vfsops nwfs_vfsops = {
|
||||
nwfs_mount,
|
||||
@ -446,7 +443,7 @@ nwfs_uninit(struct vfsconf *vfsp)
|
||||
int
|
||||
nwfs_statfs(mp, sbp, p)
|
||||
struct mount *mp;
|
||||
register struct statfs *sbp;
|
||||
struct statfs *sbp;
|
||||
struct proc *p;
|
||||
{
|
||||
struct nwmount *nmp = VFSTONWFS(mp);
|
||||
@ -496,7 +493,7 @@ nwfs_sync(mp, waitfor, cred, p)
|
||||
struct ucred *cred;
|
||||
struct proc *p;
|
||||
{
|
||||
register struct vnode *vp;
|
||||
struct vnode *vp;
|
||||
int error, allerror = 0;
|
||||
/*
|
||||
* Force stale buffer cache information to be flushed.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, Boris Popov
|
||||
* Copyright (c) 1999, 2000 Boris Popov
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -59,28 +59,28 @@
|
||||
/*
|
||||
* Prototypes for NWFS vnode operations
|
||||
*/
|
||||
static int nwfs_create __P((struct vop_create_args *));
|
||||
static int nwfs_mknod __P((struct vop_mknod_args *));
|
||||
static int nwfs_open __P((struct vop_open_args *));
|
||||
static int nwfs_close __P((struct vop_close_args *));
|
||||
static int nwfs_access __P((struct vop_access_args *));
|
||||
static int nwfs_getattr __P((struct vop_getattr_args *));
|
||||
static int nwfs_setattr __P((struct vop_setattr_args *));
|
||||
static int nwfs_read __P((struct vop_read_args *));
|
||||
static int nwfs_write __P((struct vop_write_args *));
|
||||
static int nwfs_fsync __P((struct vop_fsync_args *));
|
||||
static int nwfs_remove __P((struct vop_remove_args *));
|
||||
static int nwfs_link __P((struct vop_link_args *));
|
||||
static int nwfs_lookup __P((struct vop_lookup_args *));
|
||||
static int nwfs_rename __P((struct vop_rename_args *));
|
||||
static int nwfs_mkdir __P((struct vop_mkdir_args *));
|
||||
static int nwfs_rmdir __P((struct vop_rmdir_args *));
|
||||
static int nwfs_symlink __P((struct vop_symlink_args *));
|
||||
static int nwfs_readdir __P((struct vop_readdir_args *));
|
||||
static int nwfs_bmap __P((struct vop_bmap_args *));
|
||||
static int nwfs_strategy __P((struct vop_strategy_args *));
|
||||
static int nwfs_print __P((struct vop_print_args *));
|
||||
static int nwfs_pathconf __P((struct vop_pathconf_args *ap));
|
||||
static int nwfs_create(struct vop_create_args *);
|
||||
static int nwfs_mknod(struct vop_mknod_args *);
|
||||
static int nwfs_open(struct vop_open_args *);
|
||||
static int nwfs_close(struct vop_close_args *);
|
||||
static int nwfs_access(struct vop_access_args *);
|
||||
static int nwfs_getattr(struct vop_getattr_args *);
|
||||
static int nwfs_setattr(struct vop_setattr_args *);
|
||||
static int nwfs_read(struct vop_read_args *);
|
||||
static int nwfs_write(struct vop_write_args *);
|
||||
static int nwfs_fsync(struct vop_fsync_args *);
|
||||
static int nwfs_remove(struct vop_remove_args *);
|
||||
static int nwfs_link(struct vop_link_args *);
|
||||
static int nwfs_lookup(struct vop_lookup_args *);
|
||||
static int nwfs_rename(struct vop_rename_args *);
|
||||
static int nwfs_mkdir(struct vop_mkdir_args *);
|
||||
static int nwfs_rmdir(struct vop_rmdir_args *);
|
||||
static int nwfs_symlink(struct vop_symlink_args *);
|
||||
static int nwfs_readdir(struct vop_readdir_args *);
|
||||
static int nwfs_bmap(struct vop_bmap_args *);
|
||||
static int nwfs_strategy(struct vop_strategy_args *);
|
||||
static int nwfs_print(struct vop_print_args *);
|
||||
static int nwfs_pathconf(struct vop_pathconf_args *ap);
|
||||
|
||||
/* Global vfs data structures for nwfs */
|
||||
vop_t **nwfs_vnodeop_p;
|
||||
@ -144,7 +144,7 @@ nwfs_access(ap)
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct ucred *cred = ap->a_cred;
|
||||
u_int mode = ap->a_mode;
|
||||
struct nwmount *nmp = VTONWFS(vp);
|
||||
@ -182,7 +182,7 @@ nwfs_open(ap)
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
int mode = ap->a_mode;
|
||||
struct nwnode *np = VTONW(vp);
|
||||
struct ncp_open_info no;
|
||||
@ -247,8 +247,8 @@ nwfs_close(ap)
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct nwnode *np = VTONW(vp);
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct nwnode *np = VTONW(vp);
|
||||
int error;
|
||||
|
||||
NCPVNDEBUG("name=%s,pid=%d,c=%d\n",np->n_name,ap->a_p->p_pid,np->opened);
|
||||
@ -287,8 +287,8 @@ nwfs_getattr(ap)
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct nwnode *np = VTONW(vp);
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct nwnode *np = VTONW(vp);
|
||||
struct vattr *va=ap->a_vap;
|
||||
struct nwmount *nmp = VTONWFS(vp);
|
||||
struct nw_entry_info fattr;
|
||||
@ -329,9 +329,9 @@ nwfs_setattr(ap)
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct nwnode *np = VTONW(vp);
|
||||
register struct vattr *vap = ap->a_vap;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct nwnode *np = VTONW(vp);
|
||||
struct vattr *vap = ap->a_vap;
|
||||
u_quad_t tsize=0;
|
||||
int error = 0;
|
||||
|
||||
@ -386,7 +386,7 @@ nwfs_read(ap)
|
||||
struct ucred *a_cred;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct uio *uio=ap->a_uio;
|
||||
int error;
|
||||
NCPVNDEBUG("nwfs_read:\n");
|
||||
@ -406,7 +406,7 @@ nwfs_write(ap)
|
||||
struct ucred *a_cred;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct uio *uio = ap->a_uio;
|
||||
int error;
|
||||
|
||||
@ -433,10 +433,10 @@ nwfs_create(ap)
|
||||
struct vattr *a_vap;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *dvp = ap->a_dvp;
|
||||
register struct vattr *vap = ap->a_vap;
|
||||
struct vnode *dvp = ap->a_dvp;
|
||||
struct vattr *vap = ap->a_vap;
|
||||
struct vnode **vpp=ap->a_vpp;
|
||||
register struct componentname *cnp = ap->a_cnp;
|
||||
struct componentname *cnp = ap->a_cnp;
|
||||
struct vnode *vp = (struct vnode *)0;
|
||||
int error = 0, fmode;
|
||||
struct vattr vattr;
|
||||
@ -489,10 +489,10 @@ nwfs_remove(ap)
|
||||
struct componentname * a_cnp;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct vnode *dvp = ap->a_dvp;
|
||||
register struct componentname *cnp = ap->a_cnp;
|
||||
register struct nwnode *np = VTONW(vp);
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct vnode *dvp = ap->a_dvp;
|
||||
struct componentname *cnp = ap->a_cnp;
|
||||
struct nwnode *np = VTONW(vp);
|
||||
struct nwmount *nmp = VTONWFS(vp);
|
||||
int error;
|
||||
|
||||
@ -523,12 +523,12 @@ nwfs_rename(ap)
|
||||
struct componentname *a_tcnp;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *fvp = ap->a_fvp;
|
||||
register struct vnode *tvp = ap->a_tvp;
|
||||
register struct vnode *fdvp = ap->a_fdvp;
|
||||
register struct vnode *tdvp = ap->a_tdvp;
|
||||
register struct componentname *tcnp = ap->a_tcnp;
|
||||
register struct componentname *fcnp = ap->a_fcnp;
|
||||
struct vnode *fvp = ap->a_fvp;
|
||||
struct vnode *tvp = ap->a_tvp;
|
||||
struct vnode *fdvp = ap->a_fdvp;
|
||||
struct vnode *tdvp = ap->a_tdvp;
|
||||
struct componentname *tcnp = ap->a_tcnp;
|
||||
struct componentname *fcnp = ap->a_fcnp;
|
||||
struct nwmount *nmp=VTONWFS(fvp);
|
||||
u_int16_t oldtype = 6;
|
||||
int error=0;
|
||||
@ -648,10 +648,10 @@ nwfs_mkdir(ap)
|
||||
struct vattr *a_vap;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *dvp = ap->a_dvp;
|
||||
/* register struct vattr *vap = ap->a_vap;*/
|
||||
register struct componentname *cnp = ap->a_cnp;
|
||||
register int len=cnp->cn_namelen;
|
||||
struct vnode *dvp = ap->a_dvp;
|
||||
/* struct vattr *vap = ap->a_vap;*/
|
||||
struct componentname *cnp = ap->a_cnp;
|
||||
int len=cnp->cn_namelen;
|
||||
struct ncp_open_info no;
|
||||
struct nwnode *np;
|
||||
struct vnode *newvp = (struct vnode *)0;
|
||||
@ -697,9 +697,9 @@ nwfs_rmdir(ap)
|
||||
struct componentname *a_cnp;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct vnode *dvp = ap->a_dvp;
|
||||
register struct componentname *cnp = ap->a_cnp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct vnode *dvp = ap->a_dvp;
|
||||
struct componentname *cnp = ap->a_cnp;
|
||||
struct nwmount *nmp = VTONWFS(vp);
|
||||
struct nwnode *dnp = VTONW(dvp);
|
||||
int error = EIO;
|
||||
@ -731,8 +731,8 @@ nwfs_readdir(ap)
|
||||
int a_ncookies;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct uio *uio = ap->a_uio;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct uio *uio = ap->a_uio;
|
||||
int error;
|
||||
|
||||
if (vp->v_type != VDIR)
|
||||
@ -837,7 +837,7 @@ nwfs_bmap(ap)
|
||||
int *a_runb;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
|
||||
if (ap->a_vpp != NULL)
|
||||
*ap->a_vpp = vp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user