Remove register keyword.
This commit is contained in:
parent
1cfe33f2ca
commit
13a263882f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96752
@ -95,13 +95,13 @@ ext2_discard_prealloc(ip)
|
||||
*/
|
||||
int
|
||||
ext2_alloc(ip, lbn, bpref, size, cred, bnp)
|
||||
register struct inode *ip;
|
||||
struct inode *ip;
|
||||
daddr_t lbn, bpref;
|
||||
int size;
|
||||
struct ucred *cred;
|
||||
daddr_t *bnp;
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
daddr_t bno;
|
||||
|
||||
*bnp = 0;
|
||||
@ -364,9 +364,9 @@ ext2_valloc(pvp, mode, cred, vpp)
|
||||
struct ucred *cred;
|
||||
struct vnode **vpp;
|
||||
{
|
||||
register struct inode *pip;
|
||||
register struct ext2_sb_info *fs;
|
||||
register struct inode *ip;
|
||||
struct inode *pip;
|
||||
struct ext2_sb_info *fs;
|
||||
struct inode *ip;
|
||||
ino_t ino;
|
||||
int i, error;
|
||||
|
||||
@ -472,11 +472,11 @@ ext2_blkpref(ip, lbn, indx, bap, blocknr)
|
||||
*/
|
||||
void
|
||||
ext2_blkfree(ip, bno, size)
|
||||
register struct inode *ip;
|
||||
struct inode *ip;
|
||||
daddr_t bno;
|
||||
long size;
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
|
||||
fs = ip->i_e2fs;
|
||||
/*
|
||||
@ -496,9 +496,9 @@ ext2_vfree(pvp, ino, mode)
|
||||
ino_t ino;
|
||||
int mode;
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
register struct inode *pip;
|
||||
register mode_t save_i_mode;
|
||||
struct ext2_sb_info *fs;
|
||||
struct inode *pip;
|
||||
mode_t save_i_mode;
|
||||
|
||||
pip = VTOI(pvp);
|
||||
fs = pip->i_e2fs;
|
||||
|
@ -61,15 +61,15 @@
|
||||
*/
|
||||
int
|
||||
ext2_balloc(ip, bn, size, cred, bpp, flags)
|
||||
register struct inode *ip;
|
||||
register daddr_t bn;
|
||||
struct inode *ip;
|
||||
daddr_t bn;
|
||||
int size;
|
||||
struct ucred *cred;
|
||||
struct buf **bpp;
|
||||
int flags;
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
register daddr_t nb;
|
||||
struct ext2_sb_info *fs;
|
||||
daddr_t nb;
|
||||
struct buf *bp, *nbp;
|
||||
struct vnode *vp = ITOV(ip);
|
||||
struct indir indirs[NIADDR + 2];
|
||||
|
@ -75,7 +75,7 @@ ext2_update(vp, waitfor)
|
||||
struct vnode *vp;
|
||||
int waitfor;
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
struct buf *bp;
|
||||
struct inode *ip;
|
||||
int error;
|
||||
@ -123,17 +123,16 @@ ext2_truncate(vp, length, flags, cred, td)
|
||||
struct ucred *cred;
|
||||
struct thread *td;
|
||||
{
|
||||
register struct vnode *ovp = vp;
|
||||
register daddr_t lastblock;
|
||||
register struct inode *oip;
|
||||
struct vnode *ovp = vp;
|
||||
daddr_t lastblock;
|
||||
struct inode *oip;
|
||||
daddr_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR];
|
||||
daddr_t oldblks[NDADDR + NIADDR], newblks[NDADDR + NIADDR];
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
struct buf *bp;
|
||||
int offset, size, level;
|
||||
long count, nblocks, blocksreleased = 0;
|
||||
register int i;
|
||||
int aflags, error, allerror;
|
||||
int aflags, error, i, allerror;
|
||||
off_t osize;
|
||||
/*
|
||||
printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
|
||||
@ -283,7 +282,7 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
|
||||
* All whole direct blocks or frags.
|
||||
*/
|
||||
for (i = NDADDR - 1; i > lastblock; i--) {
|
||||
register long bsize;
|
||||
long bsize;
|
||||
|
||||
bn = oip->i_db[i];
|
||||
if (bn == 0)
|
||||
@ -360,20 +359,18 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
|
||||
|
||||
static int
|
||||
ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
|
||||
register struct inode *ip;
|
||||
struct inode *ip;
|
||||
daddr_t lbn, lastbn;
|
||||
daddr_t dbn;
|
||||
int level;
|
||||
long *countp;
|
||||
{
|
||||
register int i;
|
||||
struct buf *bp;
|
||||
register struct ext2_sb_info *fs = ip->i_e2fs;
|
||||
register daddr_t *bap;
|
||||
struct ext2_sb_info *fs = ip->i_e2fs;
|
||||
struct vnode *vp;
|
||||
daddr_t *copy, nb, nlbn, last;
|
||||
daddr_t *bap, *copy, nb, nlbn, last;
|
||||
long blkcount, factor;
|
||||
int nblocks, blocksreleased = 0;
|
||||
int i, nblocks, blocksreleased = 0;
|
||||
int error = 0, allerror = 0;
|
||||
|
||||
/*
|
||||
|
@ -136,7 +136,7 @@ ext2_readdir(ap)
|
||||
struct ucred *a_cred;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct uio *uio = ap->a_uio;
|
||||
struct uio *uio = ap->a_uio;
|
||||
int count, error;
|
||||
|
||||
struct ext2_dir_entry_2 *edp, *dp;
|
||||
@ -292,10 +292,10 @@ ext2_lookup(ap)
|
||||
struct componentname *a_cnp;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vdp; /* vnode for directory being searched */
|
||||
register struct inode *dp; /* inode for directory being searched */
|
||||
struct vnode *vdp; /* vnode for directory being searched */
|
||||
struct inode *dp; /* inode for directory being searched */
|
||||
struct buf *bp; /* a buffer of directory entries */
|
||||
register struct ext2_dir_entry_2 *ep; /* the current directory entry */
|
||||
struct ext2_dir_entry_2 *ep; /* the current directory entry */
|
||||
int entryoffsetinblock; /* offset of ep in bp's buffer */
|
||||
enum {NONE, COMPACT, FOUND} slotstatus;
|
||||
doff_t slotoffset; /* offset of area with free space */
|
||||
@ -728,7 +728,7 @@ ext2_dirbad(ip, offset, how)
|
||||
static int
|
||||
ext2_dirbadentry(dp, de, entryoffsetinblock)
|
||||
struct vnode *dp;
|
||||
register struct ext2_dir_entry_2 *de;
|
||||
struct ext2_dir_entry_2 *de;
|
||||
int entryoffsetinblock;
|
||||
{
|
||||
int DIRBLKSIZ = VTOI(dp)->i_e2fs->s_blocksize;
|
||||
@ -769,10 +769,10 @@ int
|
||||
ext2_direnter(ip, dvp, cnp)
|
||||
struct inode *ip;
|
||||
struct vnode *dvp;
|
||||
register struct componentname *cnp;
|
||||
struct componentname *cnp;
|
||||
{
|
||||
register struct ext2_dir_entry_2 *ep, *nep;
|
||||
register struct inode *dp;
|
||||
struct ext2_dir_entry_2 *ep, *nep;
|
||||
struct inode *dp;
|
||||
struct buf *bp;
|
||||
struct ext2_dir_entry_2 newdir;
|
||||
struct iovec aiov;
|
||||
@ -918,7 +918,7 @@ ext2_dirremove(dvp, cnp)
|
||||
struct vnode *dvp;
|
||||
struct componentname *cnp;
|
||||
{
|
||||
register struct inode *dp;
|
||||
struct inode *dp;
|
||||
struct ext2_dir_entry_2 *ep;
|
||||
struct buf *bp;
|
||||
int error;
|
||||
@ -989,13 +989,13 @@ ext2_dirrewrite(dp, ip, cnp)
|
||||
*/
|
||||
int
|
||||
ext2_dirempty(ip, parentino, cred)
|
||||
register struct inode *ip;
|
||||
struct inode *ip;
|
||||
ino_t parentino;
|
||||
struct ucred *cred;
|
||||
{
|
||||
register off_t off;
|
||||
off_t off;
|
||||
struct dirtemplate dbuf;
|
||||
register struct ext2_dir_entry_2 *dp = (struct ext2_dir_entry_2 *)&dbuf;
|
||||
struct ext2_dir_entry_2 *dp = (struct ext2_dir_entry_2 *)&dbuf;
|
||||
int error, count, namlen;
|
||||
|
||||
#define MINDIRSIZ (sizeof (struct dirtemplate) / 2)
|
||||
|
@ -61,10 +61,10 @@ READ(ap)
|
||||
struct ucred *a_cred;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp;
|
||||
register struct inode *ip;
|
||||
register struct uio *uio;
|
||||
register FS *fs;
|
||||
struct vnode *vp;
|
||||
struct inode *ip;
|
||||
struct uio *uio;
|
||||
FS *fs;
|
||||
struct buf *bp;
|
||||
daddr_t lbn, nextlbn;
|
||||
off_t bytesinfile;
|
||||
@ -167,10 +167,10 @@ WRITE(ap)
|
||||
struct ucred *a_cred;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp;
|
||||
register struct uio *uio;
|
||||
register struct inode *ip;
|
||||
register FS *fs;
|
||||
struct vnode *vp;
|
||||
struct uio *uio;
|
||||
struct inode *ip;
|
||||
FS *fs;
|
||||
struct buf *bp;
|
||||
struct thread *td;
|
||||
daddr_t lbn;
|
||||
|
@ -74,7 +74,7 @@ ext2_blkatoff(vp, offset, res, bpp)
|
||||
struct buf **bpp;
|
||||
{
|
||||
struct inode *ip;
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
struct buf *bp;
|
||||
daddr_t lbn;
|
||||
int bsize, error;
|
||||
@ -101,8 +101,8 @@ ext2_checkoverlap(bp, ip)
|
||||
struct buf *bp;
|
||||
struct inode *ip;
|
||||
{
|
||||
register struct buf *ebp, *ep;
|
||||
register daddr_t start, last;
|
||||
struct buf *ebp, *ep;
|
||||
daddr_t start, last;
|
||||
struct vnode *vp;
|
||||
|
||||
ebp = &buf[nbuf];
|
||||
|
@ -123,8 +123,8 @@ static int ext2_mountroot(void);
|
||||
static int
|
||||
ext2_mountroot()
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
register struct mount *mp;
|
||||
struct ext2_sb_info *fs;
|
||||
struct mount *mp;
|
||||
struct thread *td = curthread;
|
||||
struct ext2mount *ump;
|
||||
u_int size;
|
||||
@ -175,7 +175,7 @@ ext2_mountroot()
|
||||
*/
|
||||
static int
|
||||
ext2_mount(mp, path, data, ndp, td)
|
||||
register struct mount *mp;
|
||||
struct mount *mp;
|
||||
char *path;
|
||||
caddr_t data; /* this is actually a (struct ext2_args *) */
|
||||
struct nameidata *ndp;
|
||||
@ -184,7 +184,7 @@ ext2_mount(mp, path, data, ndp, td)
|
||||
struct vnode *devvp;
|
||||
struct ext2_args args;
|
||||
struct ext2mount *ump = 0;
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
size_t size;
|
||||
int error, flags;
|
||||
mode_t accessmode;
|
||||
@ -520,11 +520,11 @@ static int compute_sb_data(devvp, es, fs)
|
||||
*/
|
||||
static int
|
||||
ext2_reload(mountp, cred, td)
|
||||
register struct mount *mountp;
|
||||
struct mount *mountp;
|
||||
struct ucred *cred;
|
||||
struct thread *td;
|
||||
{
|
||||
register struct vnode *vp, *nvp, *devvp;
|
||||
struct vnode *vp, *nvp, *devvp;
|
||||
struct inode *ip;
|
||||
struct buf *bp;
|
||||
struct ext2_super_block * es;
|
||||
@ -612,13 +612,13 @@ ext2_reload(mountp, cred, td)
|
||||
*/
|
||||
static int
|
||||
ext2_mountfs(devvp, mp, td)
|
||||
register struct vnode *devvp;
|
||||
struct vnode *devvp;
|
||||
struct mount *mp;
|
||||
struct thread *td;
|
||||
{
|
||||
register struct ext2mount *ump;
|
||||
struct ext2mount *ump;
|
||||
struct buf *bp;
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
struct ext2_super_block * es;
|
||||
dev_t dev = devvp->v_rdev;
|
||||
int error;
|
||||
@ -742,8 +742,8 @@ ext2_unmount(mp, mntflags, td)
|
||||
int mntflags;
|
||||
struct thread *td;
|
||||
{
|
||||
register struct ext2mount *ump;
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2mount *ump;
|
||||
struct ext2_sb_info *fs;
|
||||
int error, flags, ronly, i;
|
||||
|
||||
flags = 0;
|
||||
@ -794,7 +794,7 @@ ext2_unmount(mp, mntflags, td)
|
||||
*/
|
||||
static int
|
||||
ext2_flushfiles(mp, flags, td)
|
||||
register struct mount *mp;
|
||||
struct mount *mp;
|
||||
int flags;
|
||||
struct thread *td;
|
||||
{
|
||||
@ -811,13 +811,13 @@ ext2_flushfiles(mp, flags, td)
|
||||
static int
|
||||
ext2_statfs(mp, sbp, td)
|
||||
struct mount *mp;
|
||||
register struct statfs *sbp;
|
||||
struct statfs *sbp;
|
||||
struct thread *td;
|
||||
{
|
||||
unsigned long overhead;
|
||||
register struct ext2mount *ump;
|
||||
register struct ext2_sb_info *fs;
|
||||
register struct ext2_super_block *es;
|
||||
struct ext2mount *ump;
|
||||
struct ext2_sb_info *fs;
|
||||
struct ext2_super_block *es;
|
||||
int i, nsb;
|
||||
|
||||
ump = VFSTOEXT2(mp);
|
||||
@ -957,8 +957,8 @@ ext2_vget(mp, ino, flags, vpp)
|
||||
int flags;
|
||||
struct vnode **vpp;
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
register struct inode *ip;
|
||||
struct ext2_sb_info *fs;
|
||||
struct inode *ip;
|
||||
struct ext2mount *ump;
|
||||
struct buf *bp;
|
||||
struct vnode *vp;
|
||||
@ -1103,12 +1103,12 @@ printf("ext2_vget(%d) dbn= %d ", ino, fsbtodb(fs, ino_to_fsba(fs, ino)));
|
||||
*/
|
||||
static int
|
||||
ext2_fhtovp(mp, fhp, vpp)
|
||||
register struct mount *mp;
|
||||
struct mount *mp;
|
||||
struct fid *fhp;
|
||||
struct vnode **vpp;
|
||||
{
|
||||
struct inode *ip;
|
||||
register struct ufid *ufhp;
|
||||
struct ufid *ufhp;
|
||||
struct vnode *nvp;
|
||||
struct ext2_sb_info *fs;
|
||||
int error;
|
||||
@ -1144,8 +1144,8 @@ ext2_vptofh(vp, fhp)
|
||||
struct vnode *vp;
|
||||
struct fid *fhp;
|
||||
{
|
||||
register struct inode *ip;
|
||||
register struct ufid *ufhp;
|
||||
struct inode *ip;
|
||||
struct ufid *ufhp;
|
||||
|
||||
ip = VTOI(vp);
|
||||
ufhp = (struct ufid *)fhp;
|
||||
@ -1163,9 +1163,9 @@ ext2_sbupdate(mp, waitfor)
|
||||
struct ext2mount *mp;
|
||||
int waitfor;
|
||||
{
|
||||
register struct ext2_sb_info *fs = mp->um_e2fs;
|
||||
register struct ext2_super_block *es = fs->s_es;
|
||||
register struct buf *bp;
|
||||
struct ext2_sb_info *fs = mp->um_e2fs;
|
||||
struct ext2_super_block *es = fs->s_es;
|
||||
struct buf *bp;
|
||||
int error = 0;
|
||||
/*
|
||||
printf("\nupdating superblock, waitfor=%s\n", waitfor == MNT_WAIT ? "yes":"no");
|
||||
|
@ -683,8 +683,8 @@ ext2_fsync(ap)
|
||||
struct thread *a_td;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct buf *bp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct buf *bp;
|
||||
struct buf *nbp;
|
||||
int s;
|
||||
|
||||
@ -880,7 +880,7 @@ ext2_rename(ap)
|
||||
} */ *ap;
|
||||
{
|
||||
struct vnode *tvp = ap->a_tvp;
|
||||
register struct vnode *tdvp = ap->a_tdvp;
|
||||
struct vnode *tdvp = ap->a_tdvp;
|
||||
struct vnode *fvp = ap->a_fvp;
|
||||
struct vnode *fdvp = ap->a_fdvp;
|
||||
struct componentname *tcnp = ap->a_tcnp;
|
||||
@ -1286,10 +1286,10 @@ ext2_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 struct inode *ip, *dp;
|
||||
struct vnode *dvp = ap->a_dvp;
|
||||
struct vattr *vap = ap->a_vap;
|
||||
struct componentname *cnp = ap->a_cnp;
|
||||
struct inode *ip, *dp;
|
||||
struct vnode *tvp;
|
||||
struct dirtemplate dirtemplate, *dtp;
|
||||
int error, dmode;
|
||||
@ -1492,8 +1492,8 @@ ext2_symlink(ap)
|
||||
char *a_target;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp, **vpp = ap->a_vpp;
|
||||
register struct inode *ip;
|
||||
struct vnode *vp, **vpp = ap->a_vpp;
|
||||
struct inode *ip;
|
||||
int len, error;
|
||||
|
||||
error = ext2_makeinode(IFLNK | ap->a_vap->va_mode, ap->a_dvp,
|
||||
@ -1882,7 +1882,7 @@ ext2_makeinode(mode, dvp, vpp, cnp)
|
||||
struct vnode **vpp;
|
||||
struct componentname *cnp;
|
||||
{
|
||||
register struct inode *ip, *pdir;
|
||||
struct inode *ip, *pdir;
|
||||
struct vnode *tvp;
|
||||
int error;
|
||||
|
||||
|
@ -95,13 +95,13 @@ ext2_discard_prealloc(ip)
|
||||
*/
|
||||
int
|
||||
ext2_alloc(ip, lbn, bpref, size, cred, bnp)
|
||||
register struct inode *ip;
|
||||
struct inode *ip;
|
||||
daddr_t lbn, bpref;
|
||||
int size;
|
||||
struct ucred *cred;
|
||||
daddr_t *bnp;
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
daddr_t bno;
|
||||
|
||||
*bnp = 0;
|
||||
@ -364,9 +364,9 @@ ext2_valloc(pvp, mode, cred, vpp)
|
||||
struct ucred *cred;
|
||||
struct vnode **vpp;
|
||||
{
|
||||
register struct inode *pip;
|
||||
register struct ext2_sb_info *fs;
|
||||
register struct inode *ip;
|
||||
struct inode *pip;
|
||||
struct ext2_sb_info *fs;
|
||||
struct inode *ip;
|
||||
ino_t ino;
|
||||
int i, error;
|
||||
|
||||
@ -472,11 +472,11 @@ ext2_blkpref(ip, lbn, indx, bap, blocknr)
|
||||
*/
|
||||
void
|
||||
ext2_blkfree(ip, bno, size)
|
||||
register struct inode *ip;
|
||||
struct inode *ip;
|
||||
daddr_t bno;
|
||||
long size;
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
|
||||
fs = ip->i_e2fs;
|
||||
/*
|
||||
@ -496,9 +496,9 @@ ext2_vfree(pvp, ino, mode)
|
||||
ino_t ino;
|
||||
int mode;
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
register struct inode *pip;
|
||||
register mode_t save_i_mode;
|
||||
struct ext2_sb_info *fs;
|
||||
struct inode *pip;
|
||||
mode_t save_i_mode;
|
||||
|
||||
pip = VTOI(pvp);
|
||||
fs = pip->i_e2fs;
|
||||
|
@ -61,15 +61,15 @@
|
||||
*/
|
||||
int
|
||||
ext2_balloc(ip, bn, size, cred, bpp, flags)
|
||||
register struct inode *ip;
|
||||
register daddr_t bn;
|
||||
struct inode *ip;
|
||||
daddr_t bn;
|
||||
int size;
|
||||
struct ucred *cred;
|
||||
struct buf **bpp;
|
||||
int flags;
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
register daddr_t nb;
|
||||
struct ext2_sb_info *fs;
|
||||
daddr_t nb;
|
||||
struct buf *bp, *nbp;
|
||||
struct vnode *vp = ITOV(ip);
|
||||
struct indir indirs[NIADDR + 2];
|
||||
|
@ -75,7 +75,7 @@ ext2_update(vp, waitfor)
|
||||
struct vnode *vp;
|
||||
int waitfor;
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
struct buf *bp;
|
||||
struct inode *ip;
|
||||
int error;
|
||||
@ -123,17 +123,16 @@ ext2_truncate(vp, length, flags, cred, td)
|
||||
struct ucred *cred;
|
||||
struct thread *td;
|
||||
{
|
||||
register struct vnode *ovp = vp;
|
||||
register daddr_t lastblock;
|
||||
register struct inode *oip;
|
||||
struct vnode *ovp = vp;
|
||||
daddr_t lastblock;
|
||||
struct inode *oip;
|
||||
daddr_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR];
|
||||
daddr_t oldblks[NDADDR + NIADDR], newblks[NDADDR + NIADDR];
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
struct buf *bp;
|
||||
int offset, size, level;
|
||||
long count, nblocks, blocksreleased = 0;
|
||||
register int i;
|
||||
int aflags, error, allerror;
|
||||
int aflags, error, i, allerror;
|
||||
off_t osize;
|
||||
/*
|
||||
printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
|
||||
@ -283,7 +282,7 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
|
||||
* All whole direct blocks or frags.
|
||||
*/
|
||||
for (i = NDADDR - 1; i > lastblock; i--) {
|
||||
register long bsize;
|
||||
long bsize;
|
||||
|
||||
bn = oip->i_db[i];
|
||||
if (bn == 0)
|
||||
@ -360,20 +359,18 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
|
||||
|
||||
static int
|
||||
ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
|
||||
register struct inode *ip;
|
||||
struct inode *ip;
|
||||
daddr_t lbn, lastbn;
|
||||
daddr_t dbn;
|
||||
int level;
|
||||
long *countp;
|
||||
{
|
||||
register int i;
|
||||
struct buf *bp;
|
||||
register struct ext2_sb_info *fs = ip->i_e2fs;
|
||||
register daddr_t *bap;
|
||||
struct ext2_sb_info *fs = ip->i_e2fs;
|
||||
struct vnode *vp;
|
||||
daddr_t *copy, nb, nlbn, last;
|
||||
daddr_t *bap, *copy, nb, nlbn, last;
|
||||
long blkcount, factor;
|
||||
int nblocks, blocksreleased = 0;
|
||||
int i, nblocks, blocksreleased = 0;
|
||||
int error = 0, allerror = 0;
|
||||
|
||||
/*
|
||||
|
@ -136,7 +136,7 @@ ext2_readdir(ap)
|
||||
struct ucred *a_cred;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct uio *uio = ap->a_uio;
|
||||
struct uio *uio = ap->a_uio;
|
||||
int count, error;
|
||||
|
||||
struct ext2_dir_entry_2 *edp, *dp;
|
||||
@ -292,10 +292,10 @@ ext2_lookup(ap)
|
||||
struct componentname *a_cnp;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vdp; /* vnode for directory being searched */
|
||||
register struct inode *dp; /* inode for directory being searched */
|
||||
struct vnode *vdp; /* vnode for directory being searched */
|
||||
struct inode *dp; /* inode for directory being searched */
|
||||
struct buf *bp; /* a buffer of directory entries */
|
||||
register struct ext2_dir_entry_2 *ep; /* the current directory entry */
|
||||
struct ext2_dir_entry_2 *ep; /* the current directory entry */
|
||||
int entryoffsetinblock; /* offset of ep in bp's buffer */
|
||||
enum {NONE, COMPACT, FOUND} slotstatus;
|
||||
doff_t slotoffset; /* offset of area with free space */
|
||||
@ -728,7 +728,7 @@ ext2_dirbad(ip, offset, how)
|
||||
static int
|
||||
ext2_dirbadentry(dp, de, entryoffsetinblock)
|
||||
struct vnode *dp;
|
||||
register struct ext2_dir_entry_2 *de;
|
||||
struct ext2_dir_entry_2 *de;
|
||||
int entryoffsetinblock;
|
||||
{
|
||||
int DIRBLKSIZ = VTOI(dp)->i_e2fs->s_blocksize;
|
||||
@ -769,10 +769,10 @@ int
|
||||
ext2_direnter(ip, dvp, cnp)
|
||||
struct inode *ip;
|
||||
struct vnode *dvp;
|
||||
register struct componentname *cnp;
|
||||
struct componentname *cnp;
|
||||
{
|
||||
register struct ext2_dir_entry_2 *ep, *nep;
|
||||
register struct inode *dp;
|
||||
struct ext2_dir_entry_2 *ep, *nep;
|
||||
struct inode *dp;
|
||||
struct buf *bp;
|
||||
struct ext2_dir_entry_2 newdir;
|
||||
struct iovec aiov;
|
||||
@ -918,7 +918,7 @@ ext2_dirremove(dvp, cnp)
|
||||
struct vnode *dvp;
|
||||
struct componentname *cnp;
|
||||
{
|
||||
register struct inode *dp;
|
||||
struct inode *dp;
|
||||
struct ext2_dir_entry_2 *ep;
|
||||
struct buf *bp;
|
||||
int error;
|
||||
@ -989,13 +989,13 @@ ext2_dirrewrite(dp, ip, cnp)
|
||||
*/
|
||||
int
|
||||
ext2_dirempty(ip, parentino, cred)
|
||||
register struct inode *ip;
|
||||
struct inode *ip;
|
||||
ino_t parentino;
|
||||
struct ucred *cred;
|
||||
{
|
||||
register off_t off;
|
||||
off_t off;
|
||||
struct dirtemplate dbuf;
|
||||
register struct ext2_dir_entry_2 *dp = (struct ext2_dir_entry_2 *)&dbuf;
|
||||
struct ext2_dir_entry_2 *dp = (struct ext2_dir_entry_2 *)&dbuf;
|
||||
int error, count, namlen;
|
||||
|
||||
#define MINDIRSIZ (sizeof (struct dirtemplate) / 2)
|
||||
|
@ -61,10 +61,10 @@ READ(ap)
|
||||
struct ucred *a_cred;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp;
|
||||
register struct inode *ip;
|
||||
register struct uio *uio;
|
||||
register FS *fs;
|
||||
struct vnode *vp;
|
||||
struct inode *ip;
|
||||
struct uio *uio;
|
||||
FS *fs;
|
||||
struct buf *bp;
|
||||
daddr_t lbn, nextlbn;
|
||||
off_t bytesinfile;
|
||||
@ -167,10 +167,10 @@ WRITE(ap)
|
||||
struct ucred *a_cred;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp;
|
||||
register struct uio *uio;
|
||||
register struct inode *ip;
|
||||
register FS *fs;
|
||||
struct vnode *vp;
|
||||
struct uio *uio;
|
||||
struct inode *ip;
|
||||
FS *fs;
|
||||
struct buf *bp;
|
||||
struct thread *td;
|
||||
daddr_t lbn;
|
||||
|
@ -74,7 +74,7 @@ ext2_blkatoff(vp, offset, res, bpp)
|
||||
struct buf **bpp;
|
||||
{
|
||||
struct inode *ip;
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
struct buf *bp;
|
||||
daddr_t lbn;
|
||||
int bsize, error;
|
||||
@ -101,8 +101,8 @@ ext2_checkoverlap(bp, ip)
|
||||
struct buf *bp;
|
||||
struct inode *ip;
|
||||
{
|
||||
register struct buf *ebp, *ep;
|
||||
register daddr_t start, last;
|
||||
struct buf *ebp, *ep;
|
||||
daddr_t start, last;
|
||||
struct vnode *vp;
|
||||
|
||||
ebp = &buf[nbuf];
|
||||
|
@ -123,8 +123,8 @@ static int ext2_mountroot(void);
|
||||
static int
|
||||
ext2_mountroot()
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
register struct mount *mp;
|
||||
struct ext2_sb_info *fs;
|
||||
struct mount *mp;
|
||||
struct thread *td = curthread;
|
||||
struct ext2mount *ump;
|
||||
u_int size;
|
||||
@ -175,7 +175,7 @@ ext2_mountroot()
|
||||
*/
|
||||
static int
|
||||
ext2_mount(mp, path, data, ndp, td)
|
||||
register struct mount *mp;
|
||||
struct mount *mp;
|
||||
char *path;
|
||||
caddr_t data; /* this is actually a (struct ext2_args *) */
|
||||
struct nameidata *ndp;
|
||||
@ -184,7 +184,7 @@ ext2_mount(mp, path, data, ndp, td)
|
||||
struct vnode *devvp;
|
||||
struct ext2_args args;
|
||||
struct ext2mount *ump = 0;
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
size_t size;
|
||||
int error, flags;
|
||||
mode_t accessmode;
|
||||
@ -520,11 +520,11 @@ static int compute_sb_data(devvp, es, fs)
|
||||
*/
|
||||
static int
|
||||
ext2_reload(mountp, cred, td)
|
||||
register struct mount *mountp;
|
||||
struct mount *mountp;
|
||||
struct ucred *cred;
|
||||
struct thread *td;
|
||||
{
|
||||
register struct vnode *vp, *nvp, *devvp;
|
||||
struct vnode *vp, *nvp, *devvp;
|
||||
struct inode *ip;
|
||||
struct buf *bp;
|
||||
struct ext2_super_block * es;
|
||||
@ -612,13 +612,13 @@ ext2_reload(mountp, cred, td)
|
||||
*/
|
||||
static int
|
||||
ext2_mountfs(devvp, mp, td)
|
||||
register struct vnode *devvp;
|
||||
struct vnode *devvp;
|
||||
struct mount *mp;
|
||||
struct thread *td;
|
||||
{
|
||||
register struct ext2mount *ump;
|
||||
struct ext2mount *ump;
|
||||
struct buf *bp;
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2_sb_info *fs;
|
||||
struct ext2_super_block * es;
|
||||
dev_t dev = devvp->v_rdev;
|
||||
int error;
|
||||
@ -742,8 +742,8 @@ ext2_unmount(mp, mntflags, td)
|
||||
int mntflags;
|
||||
struct thread *td;
|
||||
{
|
||||
register struct ext2mount *ump;
|
||||
register struct ext2_sb_info *fs;
|
||||
struct ext2mount *ump;
|
||||
struct ext2_sb_info *fs;
|
||||
int error, flags, ronly, i;
|
||||
|
||||
flags = 0;
|
||||
@ -794,7 +794,7 @@ ext2_unmount(mp, mntflags, td)
|
||||
*/
|
||||
static int
|
||||
ext2_flushfiles(mp, flags, td)
|
||||
register struct mount *mp;
|
||||
struct mount *mp;
|
||||
int flags;
|
||||
struct thread *td;
|
||||
{
|
||||
@ -811,13 +811,13 @@ ext2_flushfiles(mp, flags, td)
|
||||
static int
|
||||
ext2_statfs(mp, sbp, td)
|
||||
struct mount *mp;
|
||||
register struct statfs *sbp;
|
||||
struct statfs *sbp;
|
||||
struct thread *td;
|
||||
{
|
||||
unsigned long overhead;
|
||||
register struct ext2mount *ump;
|
||||
register struct ext2_sb_info *fs;
|
||||
register struct ext2_super_block *es;
|
||||
struct ext2mount *ump;
|
||||
struct ext2_sb_info *fs;
|
||||
struct ext2_super_block *es;
|
||||
int i, nsb;
|
||||
|
||||
ump = VFSTOEXT2(mp);
|
||||
@ -957,8 +957,8 @@ ext2_vget(mp, ino, flags, vpp)
|
||||
int flags;
|
||||
struct vnode **vpp;
|
||||
{
|
||||
register struct ext2_sb_info *fs;
|
||||
register struct inode *ip;
|
||||
struct ext2_sb_info *fs;
|
||||
struct inode *ip;
|
||||
struct ext2mount *ump;
|
||||
struct buf *bp;
|
||||
struct vnode *vp;
|
||||
@ -1103,12 +1103,12 @@ printf("ext2_vget(%d) dbn= %d ", ino, fsbtodb(fs, ino_to_fsba(fs, ino)));
|
||||
*/
|
||||
static int
|
||||
ext2_fhtovp(mp, fhp, vpp)
|
||||
register struct mount *mp;
|
||||
struct mount *mp;
|
||||
struct fid *fhp;
|
||||
struct vnode **vpp;
|
||||
{
|
||||
struct inode *ip;
|
||||
register struct ufid *ufhp;
|
||||
struct ufid *ufhp;
|
||||
struct vnode *nvp;
|
||||
struct ext2_sb_info *fs;
|
||||
int error;
|
||||
@ -1144,8 +1144,8 @@ ext2_vptofh(vp, fhp)
|
||||
struct vnode *vp;
|
||||
struct fid *fhp;
|
||||
{
|
||||
register struct inode *ip;
|
||||
register struct ufid *ufhp;
|
||||
struct inode *ip;
|
||||
struct ufid *ufhp;
|
||||
|
||||
ip = VTOI(vp);
|
||||
ufhp = (struct ufid *)fhp;
|
||||
@ -1163,9 +1163,9 @@ ext2_sbupdate(mp, waitfor)
|
||||
struct ext2mount *mp;
|
||||
int waitfor;
|
||||
{
|
||||
register struct ext2_sb_info *fs = mp->um_e2fs;
|
||||
register struct ext2_super_block *es = fs->s_es;
|
||||
register struct buf *bp;
|
||||
struct ext2_sb_info *fs = mp->um_e2fs;
|
||||
struct ext2_super_block *es = fs->s_es;
|
||||
struct buf *bp;
|
||||
int error = 0;
|
||||
/*
|
||||
printf("\nupdating superblock, waitfor=%s\n", waitfor == MNT_WAIT ? "yes":"no");
|
||||
|
@ -683,8 +683,8 @@ ext2_fsync(ap)
|
||||
struct thread *a_td;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct buf *bp;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct buf *bp;
|
||||
struct buf *nbp;
|
||||
int s;
|
||||
|
||||
@ -880,7 +880,7 @@ ext2_rename(ap)
|
||||
} */ *ap;
|
||||
{
|
||||
struct vnode *tvp = ap->a_tvp;
|
||||
register struct vnode *tdvp = ap->a_tdvp;
|
||||
struct vnode *tdvp = ap->a_tdvp;
|
||||
struct vnode *fvp = ap->a_fvp;
|
||||
struct vnode *fdvp = ap->a_fdvp;
|
||||
struct componentname *tcnp = ap->a_tcnp;
|
||||
@ -1286,10 +1286,10 @@ ext2_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 struct inode *ip, *dp;
|
||||
struct vnode *dvp = ap->a_dvp;
|
||||
struct vattr *vap = ap->a_vap;
|
||||
struct componentname *cnp = ap->a_cnp;
|
||||
struct inode *ip, *dp;
|
||||
struct vnode *tvp;
|
||||
struct dirtemplate dirtemplate, *dtp;
|
||||
int error, dmode;
|
||||
@ -1492,8 +1492,8 @@ ext2_symlink(ap)
|
||||
char *a_target;
|
||||
} */ *ap;
|
||||
{
|
||||
register struct vnode *vp, **vpp = ap->a_vpp;
|
||||
register struct inode *ip;
|
||||
struct vnode *vp, **vpp = ap->a_vpp;
|
||||
struct inode *ip;
|
||||
int len, error;
|
||||
|
||||
error = ext2_makeinode(IFLNK | ap->a_vap->va_mode, ap->a_dvp,
|
||||
@ -1882,7 +1882,7 @@ ext2_makeinode(mode, dvp, vpp, cnp)
|
||||
struct vnode **vpp;
|
||||
struct componentname *cnp;
|
||||
{
|
||||
register struct inode *ip, *pdir;
|
||||
struct inode *ip, *pdir;
|
||||
struct vnode *tvp;
|
||||
int error;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user