|
|
| version 1.11, 2004/04/02 10:50:23 | version 1.12, 2004/04/08 20:57:52 |
|---|---|
| Line 131 static int ext2_dirbadentry (struct vnod | Line 131 static int ext2_dirbadentry (struct vnod |
| * | * |
| * XXX allocate a buffer, convert as many entries as possible, then send | * XXX allocate a buffer, convert as many entries as possible, then send |
| * the whole buffer to uiomove | * the whole buffer to uiomove |
| * | |
| * ext2_readdir(struct vnode *a_vp, struct uio *a_uio, struct ucred *a_cred) | |
| */ | */ |
| 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; |
| Line 287 ext2_readdir(ap) | Line 284 ext2_readdir(ap) |
| * inode and return info to allow rewrite | * inode and return info to allow rewrite |
| * if not at end, add name to cache; if at end and neither creating | * if not at end, add name to cache; if at end and neither creating |
| * nor deleting, add name to cache | * nor deleting, add name to cache |
| * | |
| * ext2_lookup(struct vnode *a_dvp, struct vnode **a_vpp, | |
| * struct componentname *a_cnp) | |
| */ | */ |
| 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; | |
| { | { |
| struct vnode *vdp; /* vnode for directory being searched */ | struct vnode *vdp; /* vnode for directory being searched */ |
| struct inode *dp; /* inode for directory being searched */ | struct inode *dp; /* inode for directory being searched */ |
| Line 710 found: | Line 705 found: |
| * 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 ext2_dir_entry_2 *de, |
| struct vnode *dp; | int entryoffsetinblock) |
| struct ext2_dir_entry_2 *de; | |
| int entryoffsetinblock; | |
| { | { |
| int DIRBLKSIZ = VTOI(dp)->i_e2fs->s_blocksize; | int DIRBLKSIZ = VTOI(dp)->i_e2fs->s_blocksize; |
| Line 750 ext2_dirbadentry(dp, de, entryoffsetinbl | Line 743 ext2_dirbadentry(dp, de, entryoffsetinbl |
| * 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 ext2_dir_entry_2 *ep, *nep; | struct ext2_dir_entry_2 *ep, *nep; |
| struct inode *dp; | struct inode *dp; |
| Line 897 ext2_direnter(ip, dvp, cnp) | Line 887 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 ext2_dir_entry_2 *ep; | struct ext2_dir_entry_2 *ep; |
| Line 937 ext2_dirremove(dvp, cnp) | Line 925 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 ext2_dir_entry_2 *ep; | struct ext2_dir_entry_2 *ep; |
| Line 969 ext2_dirrewrite(dp, ip, cnp) | Line 955 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; |
| Line 1022 ext2_dirempty(ip, parentino, cred) | Line 1005 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, rootino, namlen; | int error, rootino, namlen; |
| Line 1077 out: | Line 1058 out: |
| vput(vp); | vput(vp); |
| return (error); | return (error); |
| } | } |