ext2fs: Use prototype declarations for function definitions
Submitted by: Christoph Mallon MFC after: 2 weeks
This commit is contained in:
parent
f37ba72632
commit
a9d1b29995
@ -80,12 +80,8 @@ static daddr_t ext2_mapsearch(struct m_ext2fs *, char *, daddr_t);
|
|||||||
* available block is located.
|
* available block is located.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_alloc(ip, lbn, bpref, size, cred, bnp)
|
ext2_alloc(struct inode *ip, int32_t lbn, int32_t bpref, int size,
|
||||||
struct inode *ip;
|
struct ucred *cred, int32_t *bnp)
|
||||||
int32_t lbn, bpref;
|
|
||||||
int size;
|
|
||||||
struct ucred *cred;
|
|
||||||
int32_t *bnp;
|
|
||||||
{
|
{
|
||||||
struct m_ext2fs *fs;
|
struct m_ext2fs *fs;
|
||||||
struct ext2mount *ump;
|
struct ext2mount *ump;
|
||||||
@ -159,11 +155,7 @@ static int doreallocblks = 0;
|
|||||||
SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, "");
|
SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, "");
|
||||||
|
|
||||||
int
|
int
|
||||||
ext2_reallocblks(ap)
|
ext2_reallocblks(struct vop_reallocblks_args *ap)
|
||||||
struct vop_reallocblks_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct cluster_save *a_buflist;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct m_ext2fs *fs;
|
struct m_ext2fs *fs;
|
||||||
struct inode *ip;
|
struct inode *ip;
|
||||||
@ -350,11 +342,7 @@ ext2_reallocblks(ap)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_valloc(pvp, mode, cred, vpp)
|
ext2_valloc(struct vnode *pvp, int mode, struct ucred *cred, struct vnode **vpp)
|
||||||
struct vnode *pvp;
|
|
||||||
int mode;
|
|
||||||
struct ucred *cred;
|
|
||||||
struct vnode **vpp;
|
|
||||||
{
|
{
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
struct inode *pip;
|
struct inode *pip;
|
||||||
@ -562,12 +550,8 @@ ext2_dirpref(struct inode *pip)
|
|||||||
* that will hold the pointer
|
* that will hold the pointer
|
||||||
*/
|
*/
|
||||||
int32_t
|
int32_t
|
||||||
ext2_blkpref(ip, lbn, indx, bap, blocknr)
|
ext2_blkpref(struct inode *ip, int32_t lbn, int indx, int32_t *bap,
|
||||||
struct inode *ip;
|
int32_t blocknr)
|
||||||
int32_t lbn;
|
|
||||||
int indx;
|
|
||||||
int32_t *bap;
|
|
||||||
int32_t blocknr;
|
|
||||||
{
|
{
|
||||||
int tmp;
|
int tmp;
|
||||||
mtx_assert(EXT2_MTX(ip->i_ump), MA_OWNED);
|
mtx_assert(EXT2_MTX(ip->i_ump), MA_OWNED);
|
||||||
@ -972,10 +956,7 @@ ext2_nodealloccg(struct inode *ip, int cg, daddr_t ipref, int mode)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ext2_blkfree(ip, bno, size)
|
ext2_blkfree(struct inode *ip, int32_t bno, long size)
|
||||||
struct inode *ip;
|
|
||||||
int32_t bno;
|
|
||||||
long size;
|
|
||||||
{
|
{
|
||||||
struct m_ext2fs *fs;
|
struct m_ext2fs *fs;
|
||||||
struct buf *bp;
|
struct buf *bp;
|
||||||
@ -1021,10 +1002,7 @@ ext2_blkfree(ip, bno, size)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_vfree(pvp, ino, mode)
|
ext2_vfree(struct vnode *pvp, ino_t ino, int mode)
|
||||||
struct vnode *pvp;
|
|
||||||
ino_t ino;
|
|
||||||
int mode;
|
|
||||||
{
|
{
|
||||||
struct m_ext2fs *fs;
|
struct m_ext2fs *fs;
|
||||||
struct inode *pip;
|
struct inode *pip;
|
||||||
@ -1113,10 +1091,7 @@ ext2_mapsearch(struct m_ext2fs *fs, char *bbp, daddr_t bpref)
|
|||||||
* fs: error message
|
* fs: error message
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
ext2_fserr(fs, uid, cp)
|
ext2_fserr(struct m_ext2fs *fs, uid_t uid, char *cp)
|
||||||
struct m_ext2fs *fs;
|
|
||||||
uid_t uid;
|
|
||||||
char *cp;
|
|
||||||
{
|
{
|
||||||
|
|
||||||
log(LOG_ERR, "uid %u on %s: %s\n", uid, fs->e2fs_fsmnt, cp);
|
log(LOG_ERR, "uid %u on %s: %s\n", uid, fs->e2fs_fsmnt, cp);
|
||||||
|
@ -55,13 +55,8 @@
|
|||||||
* the inode and the logical block number in a file.
|
* the inode and the logical block number in a file.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_balloc(ip, lbn, size, cred, bpp, flags)
|
ext2_balloc(struct inode *ip, int32_t lbn, int size, struct ucred *cred,
|
||||||
struct inode *ip;
|
struct buf **bpp, int flags)
|
||||||
int32_t lbn;
|
|
||||||
int size;
|
|
||||||
struct ucred *cred;
|
|
||||||
struct buf **bpp;
|
|
||||||
int flags;
|
|
||||||
{
|
{
|
||||||
struct m_ext2fs *fs;
|
struct m_ext2fs *fs;
|
||||||
struct ext2mount *ump;
|
struct ext2mount *ump;
|
||||||
|
@ -56,15 +56,7 @@
|
|||||||
* number to index into the array of block pointers described by the dinode.
|
* number to index into the array of block pointers described by the dinode.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_bmap(ap)
|
ext2_bmap(struct vop_bmap_args *ap)
|
||||||
struct vop_bmap_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
daddr_t a_bn;
|
|
||||||
struct bufobj **a_bop;
|
|
||||||
daddr_t *a_bnp;
|
|
||||||
int *a_runp;
|
|
||||||
int *a_runb;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
int32_t blkno;
|
int32_t blkno;
|
||||||
int error;
|
int error;
|
||||||
@ -99,12 +91,7 @@ ext2_bmap(ap)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
ext2_bmaparray(vp, bn, bnp, runp, runb)
|
ext2_bmaparray(struct vnode *vp, int32_t bn, int32_t *bnp, int *runp, int *runb)
|
||||||
struct vnode *vp;
|
|
||||||
int32_t bn;
|
|
||||||
int32_t *bnp;
|
|
||||||
int *runp;
|
|
||||||
int *runb;
|
|
||||||
{
|
{
|
||||||
struct inode *ip;
|
struct inode *ip;
|
||||||
struct buf *bp;
|
struct buf *bp;
|
||||||
@ -252,11 +239,7 @@ ext2_bmaparray(vp, bn, bnp, runp, runb)
|
|||||||
* once with the offset into the page itself.
|
* once with the offset into the page itself.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_getlbns(vp, bn, ap, nump)
|
ext2_getlbns(struct vnode *vp, int32_t bn, struct indir *ap, int *nump)
|
||||||
struct vnode *vp;
|
|
||||||
int32_t bn;
|
|
||||||
struct indir *ap;
|
|
||||||
int *nump;
|
|
||||||
{
|
{
|
||||||
long blockcnt, metalbn, realbn;
|
long blockcnt, metalbn, realbn;
|
||||||
struct ext2mount *ump;
|
struct ext2mount *ump;
|
||||||
|
@ -66,9 +66,7 @@ static int ext2_indirtrunc(struct inode *, int32_t, int32_t, int32_t, int,
|
|||||||
* set, then wait for the write to complete.
|
* set, then wait for the write to complete.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_update(vp, waitfor)
|
ext2_update(struct vnode *vp, int waitfor)
|
||||||
struct vnode *vp;
|
|
||||||
int waitfor;
|
|
||||||
{
|
{
|
||||||
struct m_ext2fs *fs;
|
struct m_ext2fs *fs;
|
||||||
struct buf *bp;
|
struct buf *bp;
|
||||||
@ -108,12 +106,8 @@ ext2_update(vp, waitfor)
|
|||||||
* disk blocks.
|
* disk blocks.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_truncate(vp, length, flags, cred, td)
|
ext2_truncate(struct vnode *vp, off_t length, int flags, struct ucred *cred,
|
||||||
struct vnode *vp;
|
struct thread *td)
|
||||||
off_t length;
|
|
||||||
int flags;
|
|
||||||
struct ucred *cred;
|
|
||||||
struct thread *td;
|
|
||||||
{
|
{
|
||||||
struct vnode *ovp = vp;
|
struct vnode *ovp = vp;
|
||||||
int32_t lastblock;
|
int32_t lastblock;
|
||||||
@ -361,12 +355,8 @@ ext2_truncate(vp, length, flags, cred, td)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
|
ext2_indirtrunc(struct inode *ip, int32_t lbn, int32_t dbn, int32_t lastbn,
|
||||||
struct inode *ip;
|
int level, long *countp)
|
||||||
int32_t lbn, lastbn;
|
|
||||||
int32_t dbn;
|
|
||||||
int level;
|
|
||||||
long *countp;
|
|
||||||
{
|
{
|
||||||
struct buf *bp;
|
struct buf *bp;
|
||||||
struct m_ext2fs *fs = ip->i_e2fs;
|
struct m_ext2fs *fs = ip->i_e2fs;
|
||||||
@ -470,11 +460,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
|
|||||||
* discard preallocated blocks
|
* discard preallocated blocks
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_inactive(ap)
|
ext2_inactive(struct vop_inactive_args *ap)
|
||||||
struct vop_inactive_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct thread *a_td;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
struct inode *ip = VTOI(vp);
|
struct inode *ip = VTOI(vp);
|
||||||
@ -510,11 +496,7 @@ ext2_inactive(ap)
|
|||||||
* Reclaim an inode so that it can be used for other purposes.
|
* Reclaim an inode so that it can be used for other purposes.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_reclaim(ap)
|
ext2_reclaim(struct vop_reclaim_args *ap)
|
||||||
struct vop_reclaim_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct thread *a_td;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct inode *ip;
|
struct inode *ip;
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
|
@ -41,8 +41,7 @@
|
|||||||
#define NSEC_TO_XTIME(t) (le32toh(t << 2) & EXT3_NSEC_MASK)
|
#define NSEC_TO_XTIME(t) (le32toh(t << 2) & EXT3_NSEC_MASK)
|
||||||
|
|
||||||
void
|
void
|
||||||
ext2_print_inode( in )
|
ext2_print_inode(struct inode *in)
|
||||||
struct inode *in;
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -68,9 +67,7 @@ ext2_print_inode( in )
|
|||||||
* raw ext2 inode to inode
|
* raw ext2 inode to inode
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ext2_ei2i(ei, ip)
|
ext2_ei2i(struct ext2fs_dinode *ei, struct inode *ip)
|
||||||
struct ext2fs_dinode *ei;
|
|
||||||
struct inode *ip;
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -113,9 +110,7 @@ ext2_ei2i(ei, ip)
|
|||||||
* inode to raw ext2 inode
|
* inode to raw ext2 inode
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ext2_i2ei(ip, ei)
|
ext2_i2ei(struct inode *ip, struct ext2fs_dinode *ei)
|
||||||
struct inode *ip;
|
|
||||||
struct ext2fs_dinode *ei;
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -129,12 +129,7 @@ static int ext2_lookup_ino(struct vnode *vdp, struct vnode **vpp,
|
|||||||
* the whole buffer to uiomove
|
* the whole buffer to uiomove
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_readdir(ap)
|
ext2_readdir(struct vop_readdir_args *ap)
|
||||||
struct vop_readdir_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct uio *a_uio;
|
|
||||||
struct ucred *a_cred;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct uio *uio = ap->a_uio;
|
struct uio *uio = ap->a_uio;
|
||||||
int count, error;
|
int count, error;
|
||||||
@ -278,12 +273,7 @@ ext2_readdir(ap)
|
|||||||
* nor deleting, add name to cache
|
* nor deleting, add name to cache
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_lookup(ap)
|
ext2_lookup(struct vop_cachedlookup_args *ap)
|
||||||
struct vop_cachedlookup_args /* {
|
|
||||||
struct vnode *a_dvp;
|
|
||||||
struct vnode **a_vpp;
|
|
||||||
struct componentname *a_cnp;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
|
|
||||||
return (ext2_lookup_ino(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL));
|
return (ext2_lookup_ino(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL));
|
||||||
@ -722,10 +712,7 @@ ext2_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ext2_dirbad(ip, offset, how)
|
ext2_dirbad(struct inode *ip, doff_t offset, char *how)
|
||||||
struct inode *ip;
|
|
||||||
doff_t offset;
|
|
||||||
char *how;
|
|
||||||
{
|
{
|
||||||
struct mount *mp;
|
struct mount *mp;
|
||||||
|
|
||||||
@ -751,10 +738,8 @@ ext2_dirbad(ip, offset, how)
|
|||||||
* changed so that it confirms to ext2_check_dir_entry
|
* changed so that it confirms to ext2_check_dir_entry
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_dirbadentry(dp, de, entryoffsetinblock)
|
ext2_dirbadentry(struct vnode *dp, struct ext2fs_direct_2 *de,
|
||||||
struct vnode *dp;
|
int entryoffsetinblock)
|
||||||
struct ext2fs_direct_2 *de;
|
|
||||||
int entryoffsetinblock;
|
|
||||||
{
|
{
|
||||||
int DIRBLKSIZ = VTOI(dp)->i_e2fs->e2fs_bsize;
|
int DIRBLKSIZ = VTOI(dp)->i_e2fs->e2fs_bsize;
|
||||||
|
|
||||||
@ -791,10 +776,7 @@ ext2_dirbadentry(dp, de, entryoffsetinblock)
|
|||||||
* entry is to be obtained.
|
* entry is to be obtained.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_direnter(ip, dvp, cnp)
|
ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp)
|
||||||
struct inode *ip;
|
|
||||||
struct vnode *dvp;
|
|
||||||
struct componentname *cnp;
|
|
||||||
{
|
{
|
||||||
struct ext2fs_direct_2 *ep, *nep;
|
struct ext2fs_direct_2 *ep, *nep;
|
||||||
struct inode *dp;
|
struct inode *dp;
|
||||||
@ -944,9 +926,7 @@ ext2_direnter(ip, dvp, cnp)
|
|||||||
* to the size of the previous entry.
|
* to the size of the previous entry.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_dirremove(dvp, cnp)
|
ext2_dirremove(struct vnode *dvp, struct componentname *cnp)
|
||||||
struct vnode *dvp;
|
|
||||||
struct componentname *cnp;
|
|
||||||
{
|
{
|
||||||
struct inode *dp;
|
struct inode *dp;
|
||||||
struct ext2fs_direct_2 *ep, *rep;
|
struct ext2fs_direct_2 *ep, *rep;
|
||||||
@ -994,9 +974,7 @@ ext2_dirremove(dvp, cnp)
|
|||||||
* set up by a call to namei.
|
* set up by a call to namei.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_dirrewrite(dp, ip, cnp)
|
ext2_dirrewrite(struct inode *dp, struct inode *ip, struct componentname *cnp)
|
||||||
struct inode *dp, *ip;
|
|
||||||
struct componentname *cnp;
|
|
||||||
{
|
{
|
||||||
struct buf *bp;
|
struct buf *bp;
|
||||||
struct ext2fs_direct_2 *ep;
|
struct ext2fs_direct_2 *ep;
|
||||||
@ -1027,10 +1005,7 @@ ext2_dirrewrite(dp, ip, cnp)
|
|||||||
* NB: does not handle corrupted directories.
|
* NB: does not handle corrupted directories.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_dirempty(ip, parentino, cred)
|
ext2_dirempty(struct inode *ip, ino_t parentino, struct ucred *cred)
|
||||||
struct inode *ip;
|
|
||||||
ino_t parentino;
|
|
||||||
struct ucred *cred;
|
|
||||||
{
|
{
|
||||||
off_t off;
|
off_t off;
|
||||||
struct dirtemplate dbuf;
|
struct dirtemplate dbuf;
|
||||||
@ -1081,9 +1056,7 @@ ext2_dirempty(ip, parentino, cred)
|
|||||||
* The target is always vput before returning.
|
* The target is always vput before returning.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_checkpath(source, target, cred)
|
ext2_checkpath(struct inode *source, struct inode *target, struct ucred *cred)
|
||||||
struct inode *source, *target;
|
|
||||||
struct ucred *cred;
|
|
||||||
{
|
{
|
||||||
struct vnode *vp;
|
struct vnode *vp;
|
||||||
int error, namlen;
|
int error, namlen;
|
||||||
|
@ -63,11 +63,7 @@ void ext2_checkoverlap(struct buf *, struct inode *);
|
|||||||
* remaining space in the directory.
|
* remaining space in the directory.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_blkatoff(vp, offset, res, bpp)
|
ext2_blkatoff(struct vnode *vp, off_t offset, char **res, struct buf **bpp)
|
||||||
struct vnode *vp;
|
|
||||||
off_t offset;
|
|
||||||
char **res;
|
|
||||||
struct buf **bpp;
|
|
||||||
{
|
{
|
||||||
struct inode *ip;
|
struct inode *ip;
|
||||||
struct m_ext2fs *fs;
|
struct m_ext2fs *fs;
|
||||||
@ -93,9 +89,7 @@ ext2_blkatoff(vp, offset, res, bpp)
|
|||||||
|
|
||||||
#ifdef KDB
|
#ifdef KDB
|
||||||
void
|
void
|
||||||
ext2_checkoverlap(bp, ip)
|
ext2_checkoverlap(struct buf *bp, struct inode *ip)
|
||||||
struct buf *bp;
|
|
||||||
struct inode *ip;
|
|
||||||
{
|
{
|
||||||
struct buf *ebp, *ep;
|
struct buf *ebp, *ep;
|
||||||
int32_t start, last;
|
int32_t start, last;
|
||||||
|
@ -223,13 +223,7 @@ ext2_itimes(struct vnode *vp)
|
|||||||
* Create a regular file
|
* Create a regular file
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_create(ap)
|
ext2_create(struct vop_create_args *ap)
|
||||||
struct vop_create_args /* {
|
|
||||||
struct vnode *a_dvp;
|
|
||||||
struct vnode **a_vpp;
|
|
||||||
struct componentname *a_cnp;
|
|
||||||
struct vattr *a_vap;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
@ -242,13 +236,7 @@ ext2_create(ap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ext2_open(ap)
|
ext2_open(struct vop_open_args *ap)
|
||||||
struct vop_open_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
int a_mode;
|
|
||||||
struct ucred *a_cred;
|
|
||||||
struct thread *a_td;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (ap->a_vp->v_type == VBLK || ap->a_vp->v_type == VCHR)
|
if (ap->a_vp->v_type == VBLK || ap->a_vp->v_type == VCHR)
|
||||||
@ -272,13 +260,7 @@ ext2_open(ap)
|
|||||||
* Update the times on the inode.
|
* Update the times on the inode.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_close(ap)
|
ext2_close(struct vop_close_args *ap)
|
||||||
struct vop_close_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
int a_fflag;
|
|
||||||
struct ucred *a_cred;
|
|
||||||
struct thread *a_td;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
|
|
||||||
@ -290,13 +272,7 @@ ext2_close(ap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ext2_access(ap)
|
ext2_access(struct vop_access_args *ap)
|
||||||
struct vop_access_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
accmode_t a_accmode;
|
|
||||||
struct ucred *a_cred;
|
|
||||||
struct thread *a_td;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
struct inode *ip = VTOI(vp);
|
struct inode *ip = VTOI(vp);
|
||||||
@ -334,12 +310,7 @@ ext2_access(ap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ext2_getattr(ap)
|
ext2_getattr(struct vop_getattr_args *ap)
|
||||||
struct vop_getattr_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct vattr *a_vap;
|
|
||||||
struct ucred *a_cred;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
struct inode *ip = VTOI(vp);
|
struct inode *ip = VTOI(vp);
|
||||||
@ -380,12 +351,7 @@ ext2_getattr(ap)
|
|||||||
* Set attribute vnode op. called from several syscalls
|
* Set attribute vnode op. called from several syscalls
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_setattr(ap)
|
ext2_setattr(struct vop_setattr_args *ap)
|
||||||
struct vop_setattr_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct vattr *a_vap;
|
|
||||||
struct ucred *a_cred;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vattr *vap = ap->a_vap;
|
struct vattr *vap = ap->a_vap;
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
@ -519,11 +485,7 @@ ext2_setattr(ap)
|
|||||||
* Inode must be locked before calling.
|
* Inode must be locked before calling.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_chmod(vp, mode, cred, td)
|
ext2_chmod(struct vnode *vp, int mode, struct ucred *cred, struct thread *td)
|
||||||
struct vnode *vp;
|
|
||||||
int mode;
|
|
||||||
struct ucred *cred;
|
|
||||||
struct thread *td;
|
|
||||||
{
|
{
|
||||||
struct inode *ip = VTOI(vp);
|
struct inode *ip = VTOI(vp);
|
||||||
int error;
|
int error;
|
||||||
@ -560,12 +522,8 @@ ext2_chmod(vp, mode, cred, td)
|
|||||||
* inode must be locked prior to call.
|
* inode must be locked prior to call.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_chown(vp, uid, gid, cred, td)
|
ext2_chown(struct vnode *vp, uid_t uid, gid_t gid, struct ucred *cred,
|
||||||
struct vnode *vp;
|
struct thread *td)
|
||||||
uid_t uid;
|
|
||||||
gid_t gid;
|
|
||||||
struct ucred *cred;
|
|
||||||
struct thread *td;
|
|
||||||
{
|
{
|
||||||
struct inode *ip = VTOI(vp);
|
struct inode *ip = VTOI(vp);
|
||||||
uid_t ouid;
|
uid_t ouid;
|
||||||
@ -610,13 +568,7 @@ ext2_chown(vp, uid, gid, cred, td)
|
|||||||
*/
|
*/
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
static int
|
static int
|
||||||
ext2_fsync(ap)
|
ext2_fsync(struct vop_fsync_args *ap)
|
||||||
struct vop_fsync_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct ucred *a_cred;
|
|
||||||
int a_waitfor;
|
|
||||||
struct thread *a_td;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Flush all dirty buffers associated with a vnode.
|
* Flush all dirty buffers associated with a vnode.
|
||||||
@ -632,13 +584,7 @@ ext2_fsync(ap)
|
|||||||
*/
|
*/
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
static int
|
static int
|
||||||
ext2_mknod(ap)
|
ext2_mknod(struct vop_mknod_args *ap)
|
||||||
struct vop_mknod_args /* {
|
|
||||||
struct vnode *a_dvp;
|
|
||||||
struct vnode **a_vpp;
|
|
||||||
struct componentname *a_cnp;
|
|
||||||
struct vattr *a_vap;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vattr *vap = ap->a_vap;
|
struct vattr *vap = ap->a_vap;
|
||||||
struct vnode **vpp = ap->a_vpp;
|
struct vnode **vpp = ap->a_vpp;
|
||||||
@ -677,12 +623,7 @@ ext2_mknod(ap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ext2_remove(ap)
|
ext2_remove(struct vop_remove_args *ap)
|
||||||
struct vop_remove_args /* {
|
|
||||||
struct vnode *a_dvp;
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct componentname *a_cnp;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct inode *ip;
|
struct inode *ip;
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
@ -708,12 +649,7 @@ ext2_remove(ap)
|
|||||||
* link vnode call
|
* link vnode call
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_link(ap)
|
ext2_link(struct vop_link_args *ap)
|
||||||
struct vop_link_args /* {
|
|
||||||
struct vnode *a_tdvp;
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct componentname *a_cnp;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
struct vnode *tdvp = ap->a_tdvp;
|
struct vnode *tdvp = ap->a_tdvp;
|
||||||
@ -776,15 +712,7 @@ ext2_link(ap)
|
|||||||
* directory.
|
* directory.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_rename(ap)
|
ext2_rename(struct vop_rename_args *ap)
|
||||||
struct vop_rename_args /* {
|
|
||||||
struct vnode *a_fdvp;
|
|
||||||
struct vnode *a_fvp;
|
|
||||||
struct componentname *a_fcnp;
|
|
||||||
struct vnode *a_tdvp;
|
|
||||||
struct vnode *a_tvp;
|
|
||||||
struct componentname *a_tcnp;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *tvp = ap->a_tvp;
|
struct vnode *tvp = ap->a_tvp;
|
||||||
struct vnode *tdvp = ap->a_tdvp;
|
struct vnode *tdvp = ap->a_tdvp;
|
||||||
@ -1139,13 +1067,7 @@ ext2_rename(ap)
|
|||||||
* Mkdir system call
|
* Mkdir system call
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_mkdir(ap)
|
ext2_mkdir(struct vop_mkdir_args *ap)
|
||||||
struct vop_mkdir_args /* {
|
|
||||||
struct vnode *a_dvp;
|
|
||||||
struct vnode **a_vpp;
|
|
||||||
struct componentname *a_cnp;
|
|
||||||
struct vattr *a_vap;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *dvp = ap->a_dvp;
|
struct vnode *dvp = ap->a_dvp;
|
||||||
struct vattr *vap = ap->a_vap;
|
struct vattr *vap = ap->a_vap;
|
||||||
@ -1276,12 +1198,7 @@ ext2_mkdir(ap)
|
|||||||
* Rmdir system call.
|
* Rmdir system call.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_rmdir(ap)
|
ext2_rmdir(struct vop_rmdir_args *ap)
|
||||||
struct vop_rmdir_args /* {
|
|
||||||
struct vnode *a_dvp;
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct componentname *a_cnp;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
struct vnode *dvp = ap->a_dvp;
|
struct vnode *dvp = ap->a_dvp;
|
||||||
@ -1349,14 +1266,7 @@ ext2_rmdir(ap)
|
|||||||
* symlink -- make a symbolic link
|
* symlink -- make a symbolic link
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_symlink(ap)
|
ext2_symlink(struct vop_symlink_args *ap)
|
||||||
struct vop_symlink_args /* {
|
|
||||||
struct vnode *a_dvp;
|
|
||||||
struct vnode **a_vpp;
|
|
||||||
struct componentname *a_cnp;
|
|
||||||
struct vattr *a_vap;
|
|
||||||
char *a_target;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *vp, **vpp = ap->a_vpp;
|
struct vnode *vp, **vpp = ap->a_vpp;
|
||||||
struct inode *ip;
|
struct inode *ip;
|
||||||
@ -1386,12 +1296,7 @@ ext2_symlink(ap)
|
|||||||
* Return target name of a symbolic link
|
* Return target name of a symbolic link
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_readlink(ap)
|
ext2_readlink(struct vop_readlink_args *ap)
|
||||||
struct vop_readlink_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct uio *a_uio;
|
|
||||||
struct ucred *a_cred;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
struct inode *ip = VTOI(vp);
|
struct inode *ip = VTOI(vp);
|
||||||
@ -1413,11 +1318,7 @@ ext2_readlink(ap)
|
|||||||
* deadlock on memory. See ext2_bmap() for details.
|
* deadlock on memory. See ext2_bmap() for details.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_strategy(ap)
|
ext2_strategy(struct vop_strategy_args *ap)
|
||||||
struct vop_strategy_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct buf *a_bp;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct buf *bp = ap->a_bp;
|
struct buf *bp = ap->a_bp;
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
@ -1455,10 +1356,7 @@ ext2_strategy(ap)
|
|||||||
* Print out the contents of an inode.
|
* Print out the contents of an inode.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_print(ap)
|
ext2_print(struct vop_print_args *ap)
|
||||||
struct vop_print_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
struct inode *ip = VTOI(vp);
|
struct inode *ip = VTOI(vp);
|
||||||
@ -1476,13 +1374,7 @@ ext2_print(ap)
|
|||||||
* Update the times on the inode then do device close.
|
* Update the times on the inode then do device close.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2fifo_close(ap)
|
ext2fifo_close(struct vop_close_args *ap)
|
||||||
struct vop_close_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
int a_fflag;
|
|
||||||
struct ucred *a_cred;
|
|
||||||
struct thread *a_td;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
|
|
||||||
@ -1499,8 +1391,7 @@ ext2fifo_close(ap)
|
|||||||
* Fall through to ext2 kqfilter routines if needed
|
* Fall through to ext2 kqfilter routines if needed
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2fifo_kqfilter(ap)
|
ext2fifo_kqfilter(struct vop_kqfilter_args *ap)
|
||||||
struct vop_kqfilter_args *ap;
|
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
@ -1514,12 +1405,7 @@ ext2fifo_kqfilter(ap)
|
|||||||
* Return POSIX pathconf information applicable to ext2 filesystems.
|
* Return POSIX pathconf information applicable to ext2 filesystems.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_pathconf(ap)
|
ext2_pathconf(struct vop_pathconf_args *ap)
|
||||||
struct vop_pathconf_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
int a_name;
|
|
||||||
int *a_retval;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (ap->a_name) {
|
switch (ap->a_name) {
|
||||||
@ -1552,11 +1438,7 @@ ext2_pathconf(ap)
|
|||||||
*/
|
*/
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
static int
|
static int
|
||||||
ext2_vptofh(ap)
|
ext2_vptofh(struct vop_vptofh_args *ap)
|
||||||
struct vop_vptofh_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct fid *a_fhp;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct inode *ip;
|
struct inode *ip;
|
||||||
struct ufid *ufhp;
|
struct ufid *ufhp;
|
||||||
@ -1574,10 +1456,7 @@ ext2_vptofh(ap)
|
|||||||
* vnodes.
|
* vnodes.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ext2_vinit(mntp, fifoops, vpp)
|
ext2_vinit(struct mount *mntp, struct vop_vector *fifoops, struct vnode **vpp)
|
||||||
struct mount *mntp;
|
|
||||||
struct vop_vector *fifoops;
|
|
||||||
struct vnode **vpp;
|
|
||||||
{
|
{
|
||||||
struct inode *ip;
|
struct inode *ip;
|
||||||
struct vnode *vp;
|
struct vnode *vp;
|
||||||
@ -1599,11 +1478,8 @@ ext2_vinit(mntp, fifoops, vpp)
|
|||||||
* Allocate a new inode.
|
* Allocate a new inode.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_makeinode(mode, dvp, vpp, cnp)
|
ext2_makeinode(int mode, struct vnode *dvp, struct vnode **vpp,
|
||||||
int mode;
|
struct componentname *cnp)
|
||||||
struct vnode *dvp;
|
|
||||||
struct vnode **vpp;
|
|
||||||
struct componentname *cnp;
|
|
||||||
{
|
{
|
||||||
struct inode *ip, *pdir;
|
struct inode *ip, *pdir;
|
||||||
struct vnode *tvp;
|
struct vnode *tvp;
|
||||||
@ -1686,13 +1562,7 @@ ext2_makeinode(mode, dvp, vpp, cnp)
|
|||||||
* Vnode op for reading.
|
* Vnode op for reading.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_read(ap)
|
ext2_read(struct vop_read_args *ap)
|
||||||
struct vop_read_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct uio *a_uio;
|
|
||||||
int a_ioflag;
|
|
||||||
struct ucred *a_cred;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *vp;
|
struct vnode *vp;
|
||||||
struct inode *ip;
|
struct inode *ip;
|
||||||
@ -1835,13 +1705,7 @@ ext2_read(ap)
|
|||||||
* Vnode op for writing.
|
* Vnode op for writing.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ext2_write(ap)
|
ext2_write(struct vop_write_args *ap)
|
||||||
struct vop_write_args /* {
|
|
||||||
struct vnode *a_vp;
|
|
||||||
struct uio *a_uio;
|
|
||||||
int a_ioflag;
|
|
||||||
struct ucred *a_cred;
|
|
||||||
} */ *ap;
|
|
||||||
{
|
{
|
||||||
struct vnode *vp;
|
struct vnode *vp;
|
||||||
struct uio *uio;
|
struct uio *uio;
|
||||||
|
Loading…
Reference in New Issue
Block a user