From cd0a65a28be7ca4aa09d02715cbb00aa2e19aebe Mon Sep 17 00:00:00 2001 From: Chris Pressey Date: Tue, 20 Apr 2004 19:59:30 +0000 Subject: [PATCH] Style(9) cleanup to src/sys/vfs, stage 11/21: ntfs. - Convert K&R-style function definitions to ANSI style. Submitted-by: Andre Nathan Additional-reformatting-by: cpressey --- sys/vfs/ntfs/ntfs_ihash.c | 14 +-- sys/vfs/ntfs/ntfs_subr.c | 231 ++++++++++--------------------------- sys/vfs/ntfs/ntfs_vfsops.c | 116 +++++-------------- sys/vfs/ntfs/ntfs_vnops.c | 167 +++++++++++---------------- 4 files changed, 164 insertions(+), 364 deletions(-) diff --git a/sys/vfs/ntfs/ntfs_ihash.c b/sys/vfs/ntfs/ntfs_ihash.c index 47a9f2a256..0e1c89aa56 100644 --- a/sys/vfs/ntfs/ntfs_ihash.c +++ b/sys/vfs/ntfs/ntfs_ihash.c @@ -34,7 +34,7 @@ * * @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95 * $FreeBSD: src/sys/ntfs/ntfs_ihash.c,v 1.7 1999/12/03 20:37:39 semenu Exp $ - * $DragonFly: src/sys/vfs/ntfs/ntfs_ihash.c,v 1.8 2004/03/01 06:33:22 dillon Exp $ + * $DragonFly: src/sys/vfs/ntfs/ntfs_ihash.c,v 1.9 2004/04/20 19:59:30 cpressey Exp $ */ #include @@ -65,7 +65,7 @@ struct lock ntfs_hashlock; * Initialize inode hash table. */ void -ntfs_nthashinit() +ntfs_nthashinit(void) { lockinit(&ntfs_hashlock, 0, "ntfs_nthashlock", 0, 0); ntfs_nthashtbl = HASHINIT(desiredvnodes, M_NTFSNTHASH, M_WAITOK, @@ -94,9 +94,7 @@ ntfs_nthash_uninit(struct vfsconf *vfc) * to it. If it is in core, return it, even if it is locked. */ struct ntnode * -ntfs_nthashlookup(dev, inum) - dev_t dev; - ino_t inum; +ntfs_nthashlookup(dev_t dev, ino_t inum) { struct ntnode *ip; lwkt_tokref ilock; @@ -115,8 +113,7 @@ ntfs_nthashlookup(dev, inum) * Insert the ntnode into the hash table. */ void -ntfs_nthashins(ip) - struct ntnode *ip; +ntfs_nthashins(struct ntnode *ip) { struct nthashhead *ipp; lwkt_tokref ilock; @@ -132,8 +129,7 @@ ntfs_nthashins(ip) * Remove the inode from the hash table. */ void -ntfs_nthashrem(ip) - struct ntnode *ip; +ntfs_nthashrem(struct ntnode *ip) { lwkt_tokref ilock; diff --git a/sys/vfs/ntfs/ntfs_subr.c b/sys/vfs/ntfs/ntfs_subr.c index 8311c7734a..06a628f4ac 100644 --- a/sys/vfs/ntfs/ntfs_subr.c +++ b/sys/vfs/ntfs/ntfs_subr.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ntfs/ntfs_subr.c,v 1.7.2.4 2001/10/12 22:08:49 semenu Exp $ - * $DragonFly: src/sys/vfs/ntfs/ntfs_subr.c,v 1.11 2004/03/01 06:33:22 dillon Exp $ + * $DragonFly: src/sys/vfs/ntfs/ntfs_subr.c,v 1.12 2004/04/20 19:59:30 cpressey Exp $ */ #include @@ -83,8 +83,7 @@ static signed int ntfs_toupper_usecount; * */ int -ntfs_ntvattrrele(vap) - struct ntvattr * vap; +ntfs_ntvattrrele(struct ntvattr *vap) { dprintf(("ntfs_ntvattrrele: ino: %d, type: 0x%x\n", vap->va_ip->i_number, vap->va_type)); @@ -98,14 +97,9 @@ ntfs_ntvattrrele(vap) * find the attribute in the ntnode */ static int -ntfs_findvattr(ntmp, ip, lvapp, vapp, type, name, namelen, vcn) - struct ntfsmount *ntmp; - struct ntnode *ip; - struct ntvattr **lvapp, **vapp; - u_int32_t type; - const char *name; - size_t namelen; - cn_t vcn; +ntfs_findvattr(struct ntfsmount *ntmp, struct ntnode *ip, + struct ntvattr **lvapp, struct ntvattr **vapp, u_int32_t type, + const char *name, size_t namelen, cn_t vcn) { int error; struct ntvattr *vap; @@ -150,13 +144,8 @@ ntfs_findvattr(ntmp, ip, lvapp, vapp, type, name, namelen, vcn) * ntnode should be locked */ int -ntfs_ntvattrget( - struct ntfsmount * ntmp, - struct ntnode * ip, - u_int32_t type, - const char *name, - cn_t vcn, - struct ntvattr ** vapp) +ntfs_ntvattrget(struct ntfsmount *ntmp, struct ntnode *ip, u_int32_t type, + const char *name, cn_t vcn, struct ntvattr **vapp) { struct ntvattr *lvap = NULL; struct attr_attrlist *aalp; @@ -260,9 +249,7 @@ out: * ntnode should be locked */ int -ntfs_loadntnode( - struct ntfsmount * ntmp, - struct ntnode * ip) +ntfs_loadntnode(struct ntfsmount *ntmp, struct ntnode *ip) { struct filerec *mfrp; daddr_t bn; @@ -353,8 +340,7 @@ out: * ntfs_ntput(). */ int -ntfs_ntget(ip) - struct ntnode *ip; +ntfs_ntget(struct ntnode *ip) { lwkt_tokref ilock; @@ -376,10 +362,7 @@ ntfs_ntget(ip) * ntnode returned locked */ int -ntfs_ntlookup( - struct ntfsmount * ntmp, - ino_t ino, - struct ntnode ** ipp) +ntfs_ntlookup(struct ntfsmount *ntmp, ino_t ino, struct ntnode **ipp) { struct ntnode *ip; @@ -433,8 +416,7 @@ ntfs_ntlookup( * ntnode should be locked on entry, and unlocked on return. */ void -ntfs_ntput(ip) - struct ntnode *ip; +ntfs_ntput(struct ntnode *ip) { struct ntvattr *vap; lwkt_tokref ilock; @@ -477,8 +459,7 @@ ntfs_ntput(ip) * increment usecount of ntnode */ void -ntfs_ntref(ip) - struct ntnode *ip; +ntfs_ntref(struct ntnode *ip) { ip->i_usecount++; @@ -491,8 +472,7 @@ ntfs_ntref(ip) * Decrement usecount of ntnode. */ void -ntfs_ntrele(ip) - struct ntnode *ip; +ntfs_ntrele(struct ntnode *ip) { lwkt_tokref ilock; @@ -513,8 +493,7 @@ ntfs_ntrele(ip) * Deallocate all memory allocated for ntvattr */ void -ntfs_freentvattr(vap) - struct ntvattr * vap; +ntfs_freentvattr(struct ntvattr *vap) { if (vap->va_flag & NTFS_AF_INRUN) { if (vap->va_vruncn) @@ -533,10 +512,8 @@ ntfs_freentvattr(vap) * runs are expanded also. */ int -ntfs_attrtontvattr( - struct ntfsmount * ntmp, - struct ntvattr ** rvapp, - struct attr * rap) +ntfs_attrtontvattr(struct ntfsmount *ntmp, struct ntvattr **rvapp, + struct attr *rap) { int error, i; struct ntvattr *vap; @@ -603,11 +580,7 @@ ntfs_attrtontvattr( * Expand run into more utilizable and more memory eating format. */ int -ntfs_runtovrun( - cn_t ** rcnp, - cn_t ** rclp, - u_long * rcntp, - u_int8_t * run) +ntfs_runtovrun(cn_t **rcnp, cn_t **rclp, u_long *rcntp, u_int8_t *run) { u_int32_t off; u_int32_t sz, i; @@ -665,12 +638,8 @@ ntfs_runtovrun( * Compare unicode and ascii string case insens. */ static int -ntfs_uastricmp(ntmp, ustr, ustrlen, astr, astrlen) - struct ntfsmount *ntmp; - const wchar *ustr; - size_t ustrlen; - const char *astr; - size_t astrlen; +ntfs_uastricmp(struct ntfsmount *ntmp, const wchar *ustr, size_t ustrlen, + const char *astr, size_t astrlen) { size_t i; int res; @@ -692,12 +661,8 @@ ntfs_uastricmp(ntmp, ustr, ustrlen, astr, astrlen) * Compare unicode and ascii string case sens. */ static int -ntfs_uastrcmp(ntmp, ustr, ustrlen, astr, astrlen) - struct ntfsmount *ntmp; - const wchar *ustr; - size_t ustrlen; - const char *astr; - size_t astrlen; +ntfs_uastrcmp(struct ntfsmount *ntmp, const wchar *ustr, size_t ustrlen, + const char *astr, size_t astrlen) { size_t i; int res; @@ -716,12 +681,8 @@ ntfs_uastrcmp(ntmp, ustr, ustrlen, astr, astrlen) * ntnode should be locked on entry. */ int -ntfs_fget( - struct ntfsmount *ntmp, - struct ntnode *ip, - int attrtype, - char *attrname, - struct fnode **fpp) +ntfs_fget(struct ntfsmount *ntmp, struct ntnode *ip, int attrtype, + char *attrname, struct fnode **fpp) { struct fnode *fp; @@ -772,8 +733,7 @@ ntfs_fget( * ntnode should be locked. */ void -ntfs_frele( - struct fnode *fp) +ntfs_frele(struct fnode *fp) { struct ntnode *ip = FTONT(fp); @@ -795,12 +755,8 @@ ntfs_frele( * If $ATTR_TYPE nott specifed, ATTR_A_DATA assumed. */ static int -ntfs_ntlookupattr( - struct ntfsmount * ntmp, - const char * name, - int namelen, - int *attrtype, - char **attrname) +ntfs_ntlookupattr(struct ntfsmount *ntmp, const char *name, int namelen, + int *attrtype, char **attrname) { const char *sys; size_t syslen, i; @@ -849,11 +805,8 @@ ntfs_ntlookupattr( * return fnode filled. */ int -ntfs_ntlookupfile( - struct ntfsmount * ntmp, - struct vnode * vp, - struct componentname * cnp, - struct vnode ** vpp) +ntfs_ntlookupfile(struct ntfsmount *ntmp, struct vnode *vp, + struct componentname *cnp, struct vnode **vpp) { struct fnode *fp = VTOF(vp); struct ntnode *ip = FTONT(fp); @@ -1055,9 +1008,7 @@ fail: * Check if name type is permitted to show. */ int -ntfs_isnamepermitted( - struct ntfsmount * ntmp, - struct attr_indexentry * iep) +ntfs_isnamepermitted(struct ntfsmount *ntmp, struct attr_indexentry *iep) { if (ntmp->ntm_flag & NTFS_MFLAG_ALLNAMES) return 1; @@ -1086,11 +1037,8 @@ ntfs_isnamepermitted( * how many records are there in $INDEX_ALLOCATION:$I30 block. */ int -ntfs_ntreaddir( - struct ntfsmount * ntmp, - struct fnode * fp, - u_int32_t num, - struct attr_indexentry ** riepp) +ntfs_ntreaddir(struct ntfsmount *ntmp, struct fnode *fp, + u_int32_t num, struct attr_indexentry **riepp) { struct ntnode *ip = FTONT(fp); struct ntvattr *vap = NULL; /* IndexRoot attribute */ @@ -1250,8 +1198,7 @@ fail: * 1601 Jan 1 into unix times. */ struct timespec -ntfs_nttimetounix( - u_int64_t nt) +ntfs_nttimetounix(u_int64_t nt) { struct timespec t; @@ -1267,10 +1214,7 @@ ntfs_nttimetounix( * Get file times from NTFS_A_NAME attribute. */ int -ntfs_times( - struct ntfsmount * ntmp, - struct ntnode * ip, - ntfs_times_t * tm) +ntfs_times(struct ntfsmount *ntmp, struct ntnode *ip, ntfs_times_t *tm) { struct ntvattr *vap; int error; @@ -1299,11 +1243,8 @@ ntfs_times( * ntnode under fnode should be locked. */ int -ntfs_filesize( - struct ntfsmount * ntmp, - struct fnode * fp, - u_int64_t * size, - u_int64_t * bytes) +ntfs_filesize(struct ntfsmount *ntmp, struct fnode *fp, u_int64_t *size, + u_int64_t *bytes) { struct ntvattr *vap; struct ntnode *ip = FTONT(fp); @@ -1337,16 +1278,10 @@ ntfs_filesize( * This is one of write routine. */ int -ntfs_writeattr_plain( - struct ntfsmount * ntmp, - struct ntnode * ip, - u_int32_t attrnum, - char *attrname, - off_t roff, - size_t rsize, - void *rdata, - size_t * initp, - struct uio *uio) +ntfs_writeattr_plain(struct ntfsmount *ntmp, struct ntnode *ip, + u_int32_t attrnum, char *attrname, off_t roff, + size_t rsize, void *rdata, size_t *initp, + struct uio *uio) { size_t init; int error = 0; @@ -1394,15 +1329,9 @@ ntfs_writeattr_plain( * ntnode should be locked. */ int -ntfs_writentvattr_plain( - struct ntfsmount * ntmp, - struct ntnode * ip, - struct ntvattr * vap, - off_t roff, - size_t rsize, - void *rdata, - size_t * initp, - struct uio *uio) +ntfs_writentvattr_plain(struct ntfsmount *ntmp, struct ntnode *ip, + struct ntvattr *vap, off_t roff, size_t rsize, + void *rdata, size_t *initp, struct uio *uio) { int error = 0; int off; @@ -1504,15 +1433,9 @@ ntfs_writentvattr_plain( * ntnode should be locked. */ int -ntfs_readntvattr_plain( - struct ntfsmount * ntmp, - struct ntnode * ip, - struct ntvattr * vap, - off_t roff, - size_t rsize, - void *rdata, - size_t * initp, - struct uio *uio) +ntfs_readntvattr_plain(struct ntfsmount *ntmp, struct ntnode *ip, + struct ntvattr *vap, off_t roff, size_t rsize, + void *rdata, size_t *initp, struct uio *uio) { int error = 0; int off; @@ -1635,16 +1558,10 @@ ntfs_readntvattr_plain( * This is one of read routines. */ int -ntfs_readattr_plain( - struct ntfsmount * ntmp, - struct ntnode * ip, - u_int32_t attrnum, - char *attrname, - off_t roff, - size_t rsize, - void *rdata, - size_t * initp, - struct uio *uio) +ntfs_readattr_plain(struct ntfsmount *ntmp, struct ntnode *ip, + u_int32_t attrnum, char *attrname, off_t roff, + size_t rsize, void *rdata, size_t * initp, + struct uio *uio) { size_t init; int error = 0; @@ -1690,15 +1607,9 @@ ntfs_readattr_plain( * This is one of read routines. */ int -ntfs_readattr( - struct ntfsmount * ntmp, - struct ntnode * ip, - u_int32_t attrnum, - char *attrname, - off_t roff, - size_t rsize, - void *rdata, - struct uio *uio) +ntfs_readattr(struct ntfsmount *ntmp, struct ntnode *ip, u_int32_t attrnum, + char *attrname, off_t roff, size_t rsize, void *rdata, + struct uio *uio) { int error = 0; struct ntvattr *vap; @@ -1785,12 +1696,7 @@ ntfs_readattr( #if UNUSED_CODE int -ntfs_parserun( - cn_t * cn, - cn_t * cl, - u_int8_t * run, - u_long len, - u_long *off) +ntfs_parserun(cn_t *cn, cn_t *cl, u_int8_t *run, u_long len, u_long *off) { u_int8_t sz; int i; @@ -1832,10 +1738,7 @@ ntfs_parserun( * Process fixup routine on given buffer. */ int -ntfs_procfixups( - struct ntfsmount * ntmp, - u_int32_t magic, - caddr_t buf, +ntfs_procfixups(struct ntfsmount *ntmp, u_int32_t magic, caddr_t buf, size_t len) { struct fixuphdr *fhp = (struct fixuphdr *) buf; @@ -1875,11 +1778,7 @@ ntfs_procfixups( #if UNUSED_CODE int -ntfs_runtocn( - cn_t * cn, - struct ntfsmount * ntmp, - u_int8_t * run, - u_long len, +ntfs_runtocn(cn_t *cn, struct ntfsmount *ntmp, u_int8_t *run, u_long len, cn_t vcn) { cn_t ccn = 0; @@ -1923,7 +1822,7 @@ ntfs_runtocn( * later work */ void -ntfs_toupper_init() +ntfs_toupper_init(void) { ntfs_toupper_tab = (wchar *) NULL; lockinit(&ntfs_toupper_lock, 0, "ntfs_toupper", 0, 0); @@ -1935,9 +1834,7 @@ ntfs_toupper_init() * otherwise read the data from the filesystem we are currently mounting */ int -ntfs_toupper_use(mp, ntmp) - struct mount *mp; - struct ntfsmount *ntmp; +ntfs_toupper_use(struct mount *mp, struct ntfsmount *ntmp) { int error = 0; struct vnode *vp; @@ -1975,7 +1872,7 @@ ntfs_toupper_use(mp, ntmp) * tied by toupper table */ void -ntfs_toupper_unuse() +ntfs_toupper_unuse(void) { /* get exclusive access */ LOCKMGR(&ntfs_toupper_lock, LK_EXCLUSIVE, NULL); @@ -1997,9 +1894,7 @@ ntfs_toupper_unuse() } int -ntfs_u28_init( - struct ntfsmount *ntmp, - wchar *u2w) +ntfs_u28_init(struct ntfsmount *ntmp, wchar *u2w) { char ** u28; int i, j, h, l; @@ -2045,9 +1940,7 @@ ntfs_u28_uninit(struct ntfsmount *ntmp) } int -ntfs_82u_init( - struct ntfsmount *ntmp, - u_int16_t *u2w) +ntfs_82u_init(struct ntfsmount *ntmp, u_int16_t *u2w) { wchar * _82u; int i; @@ -2083,9 +1976,7 @@ ntfs_82u_uninit(struct ntfsmount *ntmp) * something better has to be definitely though out */ char -ntfs_u28( - struct ntfsmount *ntmp, - wchar wc) +ntfs_u28(struct ntfsmount *ntmp, wchar wc) { char * p; diff --git a/sys/vfs/ntfs/ntfs_vfsops.c b/sys/vfs/ntfs/ntfs_vfsops.c index c1bc063d15..dd457d95e7 100644 --- a/sys/vfs/ntfs/ntfs_vfsops.c +++ b/sys/vfs/ntfs/ntfs_vfsops.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ntfs/ntfs_vfsops.c,v 1.20.2.5 2001/12/25 01:44:45 dillon Exp $ - * $DragonFly: src/sys/vfs/ntfs/ntfs_vfsops.c,v 1.13 2004/03/01 06:33:22 dillon Exp $ + * $DragonFly: src/sys/vfs/ntfs/ntfs_vfsops.c,v 1.14 2004/04/20 19:59:30 cpressey Exp $ */ @@ -118,18 +118,13 @@ static int ntfs_checkexp (struct mount *, struct mbuf *, * exflagsp and credanonp. */ static int -ntfs_checkexp(mp, nam, exflagsp, credanonp) +ntfs_checkexp(struct mount *mp, #if defined(__DragonFly__) - struct mount *mp; - struct sockaddr *nam; - int *exflagsp; - struct ucred **credanonp; + struct sockaddr *nam, #else /* defined(__NetBSD__) */ - struct mount *mp; - struct mbuf *nam; - int *exflagsp; - struct ucred **credanonp; + struct mbuf *nam, #endif + int *exflagsp, struct ucred **credanonp) { struct netcred *np; struct ntfsmount *ntm = VFSTONTFS(mp); @@ -149,20 +144,14 @@ ntfs_checkexp(mp, nam, exflagsp, credanonp) #if defined(__NetBSD__) /*ARGSUSED*/ static int -ntfs_sysctl(name, namelen, oldp, oldlenp, newp, newlen, td) - int *name; - u_int namelen; - void *oldp; - size_t *oldlenp; - void *newp; - size_t newlen; - struct thread *td; +ntfs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, + size_t newlen, struct thread *td) { return (EINVAL); } static int -ntfs_mountroot() +ntfs_mountroot(void) { struct mount *mp; extern struct vnode *rootvp; @@ -207,7 +196,7 @@ ntfs_mountroot() } static void -ntfs_init () +ntfs_init(void) { ntfs_nthashinit(); ntfs_toupper_init(); @@ -216,8 +205,7 @@ ntfs_init () #elif defined(__DragonFly__) static int -ntfs_init ( - struct vfsconf *vcp ) +ntfs_init(struct vfsconf *vcp) { ntfs_nthashinit(); ntfs_toupper_init(); @@ -227,18 +215,14 @@ ntfs_init ( #endif /* NetBSD */ static int -ntfs_mount ( - struct mount *mp, +ntfs_mount(struct mount *mp, #if defined(__DragonFly__) - char *path, - caddr_t data, + char *path, caddr_t data, #else - const char *path, - void *data, + const char *path, void *data, #endif - struct nameidata *ndp, - struct thread *td -) { + struct nameidata *ndp, struct thread *td) +{ size_t size; int err = 0; struct vnode *devvp; @@ -421,11 +405,8 @@ success: * Common code for mount and mountroot */ int -ntfs_mountfs(devvp, mp, argsp, td) - struct vnode *devvp; - struct mount *mp; - struct ntfs_args *argsp; - struct thread *td; +ntfs_mountfs(struct vnode *devvp, struct mount *mp, struct ntfs_args *argsp, + struct thread *td) { struct buf *bp; struct ntfsmount *ntmp; @@ -642,20 +623,14 @@ out: #if !defined(__DragonFly__) static int -ntfs_start ( - struct mount *mp, - int flags, - struct thread *td) +ntfs_start(struct mount *mp, int flags, struct thread *td) { return (0); } #endif static int -ntfs_unmount( - struct mount *mp, - int mntflags, - struct thread *td) +ntfs_unmount(struct mount *mp, int mntflags, struct thread *td) { struct ntfsmount *ntmp; int error, ronly = 0, flags, i; @@ -722,9 +697,7 @@ ntfs_unmount( } static int -ntfs_root( - struct mount *mp, - struct vnode **vpp ) +ntfs_root(struct mount *mp, struct vnode **vpp) { struct vnode *nvp; int error = 0; @@ -743,12 +716,8 @@ ntfs_root( #if !defined(__DragonFly__) static int -ntfs_quotactl ( - struct mount *mp, - int cmds, - uid_t uid, - caddr_t arg, - struct thread *td) +ntfs_quotactl(struct mount *mp, int cmds, uid_t uid, caddr_t arg, + struct thread *td) { printf("\nntfs_quotactl():\n"); return EOPNOTSUPP; @@ -756,9 +725,7 @@ ntfs_quotactl ( #endif int -ntfs_calccfree( - struct ntfsmount *ntmp, - cn_t *cfreep) +ntfs_calccfree(struct ntfsmount *ntmp, cn_t *cfreep) { struct vnode *vp; u_int8_t *tmp; @@ -788,10 +755,7 @@ ntfs_calccfree( } static int -ntfs_statfs( - struct mount *mp, - struct statfs *sbp, - struct thread *td) +ntfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *td) { struct ntfsmount *ntmp = VFSTONTFS(mp); u_int64_t mftsize,mftallocated; @@ -831,11 +795,7 @@ ntfs_statfs( #if !defined(__DragonFly__) static int -ntfs_sync ( - struct mount *mp, - int waitfor, - struct ucred *cred, - struct thread *td) +ntfs_sync(struct mount *mp, int waitfor, struct ucred *cred, struct thread *td) { /*dprintf(("ntfs_sync():\n"));*/ return (0); @@ -844,10 +804,7 @@ ntfs_sync ( /*ARGSUSED*/ static int -ntfs_fhtovp( - struct mount *mp, - struct fid *fhp, - struct vnode **vpp) +ntfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) { struct vnode *nvp; struct ntfid *ntfhp = (struct ntfid *)fhp; @@ -867,9 +824,7 @@ ntfs_fhtovp( } static int -ntfs_vptofh( - struct vnode *vp, - struct fid *fhp) +ntfs_vptofh(struct vnode *vp, struct fid *fhp) { struct ntnode *ntp; struct ntfid *ntfhp; @@ -885,15 +840,9 @@ ntfs_vptofh( } int -ntfs_vgetex( - struct mount *mp, - ino_t ino, - u_int32_t attrtype, - char *attrname, - u_long lkflags, - u_long flags, - struct thread *td, - struct vnode **vpp) +ntfs_vgetex(struct mount *mp, ino_t ino, u_int32_t attrtype, char *attrname, + u_long lkflags, u_long flags, struct thread *td, + struct vnode **vpp) { int error; struct ntfsmount *ntmp; @@ -998,10 +947,7 @@ ntfs_vgetex( } static int -ntfs_vget( - struct mount *mp, - ino_t ino, - struct vnode **vpp) +ntfs_vget(struct mount *mp, ino_t ino, struct vnode **vpp) { return ntfs_vgetex(mp, ino, NTFS_A_DATA, NULL, LK_EXCLUSIVE | LK_RETRY, 0, curthread, vpp); diff --git a/sys/vfs/ntfs/ntfs_vnops.c b/sys/vfs/ntfs/ntfs_vnops.c index b449f1d139..c2373b1db6 100644 --- a/sys/vfs/ntfs/ntfs_vnops.c +++ b/sys/vfs/ntfs/ntfs_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ntfs/ntfs_vnops.c,v 1.9.2.4 2002/08/06 19:35:18 semenu Exp $ - * $DragonFly: src/sys/vfs/ntfs/ntfs_vnops.c,v 1.10 2004/02/05 21:03:37 rob Exp $ + * $DragonFly: src/sys/vfs/ntfs/ntfs_vnops.c,v 1.11 2004/04/20 19:59:30 cpressey Exp $ * */ @@ -106,16 +106,14 @@ int ntfs_prtactive = 1; /* 1 => print out reclaim of active vnodes */ #if defined(__DragonFly__) int -ntfs_getpages(ap) - struct vop_getpages_args *ap; +ntfs_getpages(struct vop_getpages_args *ap) { return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, ap->a_count, ap->a_reqpage); } int -ntfs_putpages(ap) - struct vop_putpages_args *ap; +ntfs_putpages(struct vop_putpages_args *ap) { return vnode_pager_generic_putpages(ap->a_vp, ap->a_m, ap->a_count, ap->a_sync, ap->a_rtvals); @@ -124,17 +122,12 @@ ntfs_putpages(ap) /* * This is a noop, simply returning what one has been given. + * + * ntfs_bmap(struct vnode *a_vp, daddr_t a_bn, struct vnode **a_vpp, + * daddr_t *a_bnp, int *a_runp, int *a_runb) */ int -ntfs_bmap(ap) - struct vop_bmap_args /* { - struct vnode *a_vp; - daddr_t a_bn; - struct vnode **a_vpp; - daddr_t *a_bnp; - int *a_runp; - int *a_runb; - } */ *ap; +ntfs_bmap(struct vop_bmap_args *ap) { dprintf(("ntfs_bmap: vn: %p, blk: %d\n", ap->a_vp,(u_int32_t)ap->a_bn)); if (ap->a_vpp != NULL) @@ -150,14 +143,12 @@ ntfs_bmap(ap) return (0); } +/* + * ntfs_read(struct vnode *a_vp, struct uio *a_uio, int a_ioflag, + * struct ucred *a_cred) + */ static int -ntfs_read(ap) - struct vop_read_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +ntfs_read(struct vop_read_args *ap) { struct vnode *vp = ap->a_vp; struct fnode *fp = VTOF(vp); @@ -209,12 +200,11 @@ ntfs_read(ap) #if !defined(__DragonFly__) +/* + * ntfs_bypass(struct vnodeop_desc *a_desc, ...) + */ static int -ntfs_bypass(ap) - struct vop_generic_args /* { - struct vnodeop_desc *a_desc; - - } */ *ap; +ntfs_bypass(struct vop_generic_args *ap) { int error = ENOTTY; dprintf(("ntfs_bypass: %s\n", ap->a_desc->vdesc_name)); @@ -223,14 +213,12 @@ ntfs_bypass(ap) #endif +/* + * ntfs_getattr(struct vnode *a_vp, struct vattr *a_vap, struct ucred *a_cred, + * struct thread *a_td) + */ static int -ntfs_getattr(ap) - struct vop_getattr_args /* { - struct vnode *a_vp; - struct vattr *a_vap; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ntfs_getattr(struct vop_getattr_args *ap) { struct vnode *vp = ap->a_vp; struct fnode *fp = VTOF(vp); @@ -266,12 +254,11 @@ ntfs_getattr(ap) /* * Last reference to an ntnode. If necessary, write or delete it. + * + * ntfs_inactive(struct vnode *a_vp) */ int -ntfs_inactive(ap) - struct vop_inactive_args /* { - struct vnode *a_vp; - } */ *ap; +ntfs_inactive(struct vop_inactive_args *ap) { struct vnode *vp = ap->a_vp; #ifdef NTFS_DEBUG @@ -293,12 +280,11 @@ ntfs_inactive(ap) /* * Reclaim an fnode/ntnode so that it can be used for other purposes. + * + * ntfs_reclaim(struct vnode *a_vp) */ int -ntfs_reclaim(ap) - struct vop_reclaim_args /* { - struct vnode *a_vp; - } */ *ap; +ntfs_reclaim(struct vop_reclaim_args *ap) { struct vnode *vp = ap->a_vp; struct fnode *fp = VTOF(vp); @@ -323,11 +309,11 @@ ntfs_reclaim(ap) return (0); } +/* + * ntfs_print(struct vnode *a_vp) + */ static int -ntfs_print(ap) - struct vop_print_args /* { - struct vnode *a_vp; - } */ *ap; +ntfs_print(struct vop_print_args *ap) { return (0); } @@ -335,12 +321,11 @@ ntfs_print(ap) /* * Calculate the logical to physical mapping if not done already, * then call the device strategy routine. + * + * ntfs_strategy(struct buf *a_bp) */ int -ntfs_strategy(ap) - struct vop_strategy_args /* { - struct buf *a_bp; - } */ *ap; +ntfs_strategy(struct vop_strategy_args *ap) { struct buf *bp = ap->a_bp; struct vnode *vp = bp->b_vp; @@ -415,14 +400,12 @@ ntfs_strategy(ap) return (error); } +/* + * ntfs_write(struct vnode *a_vp, struct uio *a_uio, int a_ioflag, + * struct ucred *a_cred) + */ static int -ntfs_write(ap) - struct vop_write_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +ntfs_write(struct vop_write_args *ap) { struct vnode *vp = ap->a_vp; struct fnode *fp = VTOF(vp); @@ -455,14 +438,12 @@ ntfs_write(ap) return (error); } +/* + * ntfs_access(struct vnode *a_vp, int a_mode, struct ucred *a_cred, + * struct thread *a_td) + */ int -ntfs_access(ap) - struct vop_access_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ntfs_access(struct vop_access_args *ap) { struct vnode *vp = ap->a_vp; struct ntnode *ip = VTONT(vp); @@ -539,16 +520,13 @@ ntfs_access(ap) * Open called. * * Nothing to do. + * + * ntfs_open(struct vnode *a_vp, int a_mode, struct ucred *a_cred, + * struct thread *a_td) */ /* ARGSUSED */ static int -ntfs_open(ap) - struct vop_open_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ntfs_open(struct vop_open_args *ap) { #if NTFS_DEBUG struct vnode *vp = ap->a_vp; @@ -568,16 +546,13 @@ ntfs_open(ap) * Close called. * * Update the times on the inode. + * + * ntfs_close(struct vnode *a_vp, int a_fflag, struct ucred *a_cred, + * struct thread *a_td) */ /* ARGSUSED */ static int -ntfs_close(ap) - struct vop_close_args /* { - struct vnode *a_vp; - int a_fflag; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ntfs_close(struct vop_close_args *ap) { #if NTFS_DEBUG struct vnode *vp = ap->a_vp; @@ -589,15 +564,12 @@ ntfs_close(ap) return (0); } +/* + * ntfs_readdir(struct vnode *a_vp, struct uio *a_uio, struct ucred *a_cred, + * int *a_ncookies, u_int **cookies) + */ int -ntfs_readdir(ap) - struct vop_readdir_args /* { - struct vnode *a_vp; - struct uio *a_uio; - struct ucred *a_cred; - int *a_ncookies; - u_int **cookies; - } */ *ap; +ntfs_readdir(struct vop_readdir_args *ap) { struct vnode *vp = ap->a_vp; struct fnode *fp = VTOF(vp); @@ -728,13 +700,12 @@ ntfs_readdir(ap) return (error); } +/* + * ntfs_lookup(struct vnode *a_dvp, struct vnode **a_vpp, + * struct componentname *a_cnp) + */ int -ntfs_lookup(ap) - struct vop_lookup_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - } */ *ap; +ntfs_lookup(struct vop_lookup_args *ap) { struct vnode *dvp = ap->a_dvp; struct ntnode *dip = VTONT(dvp); @@ -837,15 +808,12 @@ ntfs_lookup(ap) * * This function is worthless for vnodes that represent directories. Maybe we * could just do a sync if they try an fsync on a directory file. + * + * ntfs_fsync(struct vnode *a_vp, struct ucred *a_cred, int a_waitfor, + * struct thread *a_td) */ static int -ntfs_fsync(ap) - struct vop_fsync_args /* { - struct vnode *a_vp; - struct ucred *a_cred; - int a_waitfor; - struct thread *a_td; - } */ *ap; +ntfs_fsync(struct vop_fsync_args *ap) { return (0); } @@ -855,8 +823,7 @@ ntfs_fsync(ap) * Return POSIX pathconf information applicable to NTFS filesystem */ int -ntfs_pathconf(v) - void *v; +ntfs_pathconf(void *v) { struct vop_pathconf_args /* { struct vnode *a_vp; -- 2.41.0