From d39ece62c73d6a5eea2565086d7b3419cb3e7f23 Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 3 Jul 2004 16:56:45 +0000 Subject: Remove "register" keyword and trailing white space. --- sys/fs/cd9660/cd9660_lookup.c | 18 +++++++-------- sys/fs/cd9660/cd9660_node.c | 18 +++++++-------- sys/fs/cd9660/cd9660_rrip.c | 26 ++++++++++----------- sys/fs/cd9660/cd9660_rrip.h | 8 +++---- sys/fs/cd9660/cd9660_vfsops.c | 50 ++++++++++++++++++++-------------------- sys/isofs/cd9660/cd9660_lookup.c | 18 +++++++-------- sys/isofs/cd9660/cd9660_node.c | 18 +++++++-------- sys/isofs/cd9660/cd9660_rrip.c | 26 ++++++++++----------- sys/isofs/cd9660/cd9660_rrip.h | 8 +++---- sys/isofs/cd9660/cd9660_vfsops.c | 50 ++++++++++++++++++++-------------------- 10 files changed, 120 insertions(+), 120 deletions(-) diff --git a/sys/fs/cd9660/cd9660_lookup.c b/sys/fs/cd9660/cd9660_lookup.c index 1080145..bbff6c1 100644 --- a/sys/fs/cd9660/cd9660_lookup.c +++ b/sys/fs/cd9660/cd9660_lookup.c @@ -90,9 +90,9 @@ cd9660_lookup(ap) struct componentname *a_cnp; } */ *ap; { - register struct vnode *vdp; /* vnode for directory being searched */ - register struct iso_node *dp; /* inode for directory being searched */ - register struct iso_mnt *imp; /* filesystem that directory is in */ + struct vnode *vdp; /* vnode for directory being searched */ + struct iso_node *dp; /* inode for directory being searched */ + struct iso_mnt *imp; /* filesystem that directory is in */ struct buf *bp; /* a buffer of directory entries */ struct iso_directory_record *ep = 0;/* the current directory entry */ int entryoffsetinblock; /* offset of ep in bp's buffer */ @@ -167,7 +167,7 @@ cd9660_lookup(ap) nchstats.ncs_2passes++; } endsearch = dp->i_size; - + searchloop: while (dp->i_offset < endsearch) { /* @@ -188,7 +188,7 @@ searchloop: */ ep = (struct iso_directory_record *) ((char *)bp->b_data + entryoffsetinblock); - + reclen = isonum_711(ep->length); if (reclen == 0) { /* skip to next block, if any */ @@ -204,7 +204,7 @@ searchloop: if (entryoffsetinblock + reclen > imp->logical_block_size) /* entries are not allowed to cross boundaries */ break; - + namelen = isonum_711(ep->name_len); isoflags = isonum_711(imp->iso_ftype == ISO_FTYPE_HIGH_SIERRA? &ep->date[6]: ep->flags); @@ -212,7 +212,7 @@ searchloop: if (reclen < ISO_DIRECTORY_RECORD_SIZE + namelen) /* illegal entry, stop */ break; - + /* * Check for a name match. */ @@ -317,7 +317,7 @@ notfound: found: if (numdirpasses == 2) nchstats.ncs_pass2++; - + /* * Found component in pathname. * If the final component of path name, save information @@ -408,7 +408,7 @@ cd9660_blkatoff(vp, offset, res, bpp) struct buf **bpp; { struct iso_node *ip; - register struct iso_mnt *imp; + struct iso_mnt *imp; struct buf *bp; daddr_t lbn; int bsize, bshift, error; diff --git a/sys/fs/cd9660/cd9660_node.c b/sys/fs/cd9660/cd9660_node.c index 687ec66..5091378 100644 --- a/sys/fs/cd9660/cd9660_node.c +++ b/sys/fs/cd9660/cd9660_node.c @@ -149,9 +149,9 @@ cd9660_ihashins(ip) */ static void cd9660_ihashrem(ip) - register struct iso_node *ip; + struct iso_node *ip; { - register struct iso_node *iq; + struct iso_node *iq; mtx_lock(&cd9660_ihash_mtx); if ((iq = ip->i_next) != NULL) @@ -177,7 +177,7 @@ cd9660_inactive(ap) { struct vnode *vp = ap->a_vp; struct thread *td = ap->a_td; - register struct iso_node *ip = VTOI(vp); + struct iso_node *ip = VTOI(vp); int error = 0; if (prtactive && vrefcnt(vp) != 0) @@ -204,8 +204,8 @@ cd9660_reclaim(ap) struct thread *a_td; } */ *ap; { - register struct vnode *vp = ap->a_vp; - register struct iso_node *ip = VTOI(vp); + struct vnode *vp = ap->a_vp; + struct iso_node *ip = VTOI(vp); if (prtactive && vrefcnt(vp) != 0) vprint("cd9660_reclaim: pushing active", vp); @@ -262,7 +262,7 @@ cd9660_defattr(isodir, inop, bp, ftype) } if (bp) { ap = (struct iso_extended_attributes *)bp->b_data; - + if (isonum_711(ap->version) == 1) { if (!(ap->perm[0]&0x40)) inop->inode.iso_mode |= VEXEC >> 6; @@ -314,7 +314,7 @@ cd9660_deftstamp(isodir,inop,bp,ftype) } if (bp) { ap = (struct iso_extended_attributes *)bp->b_data; - + if (ftype != ISO_FTYPE_HIGH_SIERRA && isonum_711(ap->version) == 1) { if (!cd9660_tstamp_conv17(ap->ftime,&inop->inode.iso_atime)) @@ -389,7 +389,7 @@ cd9660_chars2ui(begin,len) int len; { u_int rc; - + for (rc = 0; --len >= 0;) { rc *= 10; rc += *begin++ - '0'; @@ -403,7 +403,7 @@ cd9660_tstamp_conv17(pi,pu) struct timespec *pu; { u_char buf[7]; - + /* year:"0001"-"9999" -> -1900 */ buf[0] = cd9660_chars2ui(pi,4) - 1900; diff --git a/sys/fs/cd9660/cd9660_rrip.c b/sys/fs/cd9660/cd9660_rrip.c index f20b4db..aae7394 100644 --- a/sys/fs/cd9660/cd9660_rrip.c +++ b/sys/fs/cd9660/cd9660_rrip.c @@ -113,8 +113,8 @@ cd9660_rrip_slink(p,ana) ISO_RRIP_SLINK *p; ISO_RRIP_ANALYZE *ana; { - register ISO_RRIP_SLINK_COMPONENT *pcomp; - register ISO_RRIP_SLINK_COMPONENT *pcompe; + ISO_RRIP_SLINK_COMPONENT *pcomp; + ISO_RRIP_SLINK_COMPONENT *pcompe; int len, wlen, cont; char *outbuf, *inbuf; @@ -337,7 +337,7 @@ cd9660_rrip_tstamp(p,ana) ISO_RRIP_ANALYZE *ana; { u_char *ptime; - + ptime = p->time; /* Check a format of time stamp (7bytes/17bytes) */ @@ -351,7 +351,7 @@ cd9660_rrip_tstamp(p,ana) ptime += 7; } else bzero(&ana->inop->inode.iso_mtime,sizeof(struct timespec)); - + if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) { cd9660_tstamp_conv7(ptime,&ana->inop->inode.iso_atime, ISO_FTYPE_RRIP); @@ -374,7 +374,7 @@ cd9660_rrip_tstamp(p,ana) ptime += 17; } else bzero(&ana->inop->inode.iso_mtime,sizeof(struct timespec)); - + if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) { cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_atime); ptime += 17; @@ -408,10 +408,10 @@ cd9660_rrip_device(p,ana) ISO_RRIP_ANALYZE *ana; { u_int high, low; - + high = isonum_733(p->dev_t_high); low = isonum_733(p->dev_t_low); - + if (high == 0) ana->inop->inode.iso_rdev = makedev(umajor(low), uminor(low)); else @@ -483,9 +483,9 @@ cd9660_rrip_loop(isodir,ana,table) ISO_RRIP_ANALYZE *ana; RRIP_TABLE *table; { - register RRIP_TABLE *ptable; - register ISO_SUSP_HEADER *phead; - register ISO_SUSP_HEADER *pend; + RRIP_TABLE *ptable; + ISO_SUSP_HEADER *phead; + ISO_SUSP_HEADER *pend; struct buf *bp = NULL; char *pwhead; u_short c; @@ -541,7 +541,7 @@ cd9660_rrip_loop(isodir,ana,table) */ phead = (ISO_SUSP_HEADER *)((char *)phead + isonum_711(phead->length)); } - + if (ana->fields && ana->iso_ce_len) { if (ana->iso_ce_blk >= ana->imp->volume_space_size || ana->iso_ce_off + ana->iso_ce_len > ana->imp->logical_block_size @@ -601,7 +601,7 @@ cd9660_rrip_analyze(isodir,inop,imp) return cd9660_rrip_loop(isodir,&analyze,rrip_table_analyze); } -/* +/* * Get Alternate Name. */ static RRIP_TABLE rrip_table_getname[] = { @@ -648,7 +648,7 @@ cd9660_rrip_getname(isodir,outbuf,outlen,inump,imp) return cd9660_rrip_loop(isodir,&analyze,tab); } -/* +/* * Get Symbolic Link. */ static RRIP_TABLE rrip_table_getsymname[] = { diff --git a/sys/fs/cd9660/cd9660_rrip.h b/sys/fs/cd9660/cd9660_rrip.h index de50bb5..f6fa050 100644 --- a/sys/fs/cd9660/cd9660_rrip.h +++ b/sys/fs/cd9660/cd9660_rrip.h @@ -34,13 +34,13 @@ * @(#)cd9660_rrip.h 8.2 (Berkeley) 12/5/94 * $FreeBSD$ */ - + typedef struct { char type [ISODCL ( 0, 1)]; u_char length [ISODCL ( 2, 2)]; /* 711 */ u_char version [ISODCL ( 3, 3)]; } ISO_SUSP_HEADER; - + typedef struct { ISO_SUSP_HEADER h; char mode [ISODCL ( 4, 11)]; /* 733 */ @@ -48,13 +48,13 @@ typedef struct { char uid [ISODCL ( 20, 27)]; /* 733 */ char gid [ISODCL ( 28, 35)]; /* 733 */ } ISO_RRIP_ATTR; - + typedef struct { ISO_SUSP_HEADER h; char dev_t_high [ISODCL ( 4, 11)]; /* 733 */ char dev_t_low [ISODCL ( 12, 19)]; /* 733 */ } ISO_RRIP_DEVICE; - + #define ISO_SUSP_CFLAG_CONTINUE 0x01 #define ISO_SUSP_CFLAG_CURRENT 0x02 #define ISO_SUSP_CFLAG_PARENT 0x04 diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index dc0b240..e91f4b1 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -179,7 +179,7 @@ iso_mountroot(mp, td) */ static int cd9660_mount(mp, path, data, ndp, td) - register struct mount *mp; + struct mount *mp; char *path; caddr_t data; struct nameidata *ndp; @@ -224,14 +224,14 @@ cd9660_mount(mp, path, data, ndp, td) return (error); } - /* + /* * Verify that user has necessary permissions on the device, * or has superuser abilities */ accessmode = VREAD; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); error = VOP_ACCESS(devvp, accessmode, td->td_ucred, td); - if (error) + if (error) error = suser(td); if (error) { vput(devvp); @@ -264,12 +264,12 @@ cd9660_mount(mp, path, data, ndp, td) */ static int iso_mountfs(devvp, mp, td, argp) - register struct vnode *devvp; + struct vnode *devvp; struct mount *mp; struct thread *td; struct iso_args *argp; { - register struct iso_mnt *isomp = (struct iso_mnt *)0; + struct iso_mnt *isomp = (struct iso_mnt *)0; struct buf *bp = NULL; struct buf *pribp = NULL, *supbp = NULL; struct cdev *dev = devvp->v_rdev; @@ -327,7 +327,7 @@ iso_mountfs(devvp, mp, td, argp) if ((error = bread(devvp, iso_blknum * btodb(iso_bsize), iso_bsize, NOCRED, &bp)) != 0) goto out; - + vdp = (struct iso_volume_descriptor *)bp->b_data; if (bcmp (vdp->id, ISO_STANDARD_ID, sizeof vdp->id) != 0) { if (bcmp (vdp->id_sierra, ISO_SIERRA_ID, @@ -452,9 +452,9 @@ iso_mountfs(devvp, mp, td, argp) (isomp->im_bshift - DEV_BSHIFT), isomp->logical_block_size, NOCRED, &bp)) != 0) goto out; - + rootp = (struct iso_directory_record *)bp->b_data; - + if ((isomp->rr_skip = cd9660_rrip_offset(rootp,isomp)) < 0) { argp->flags |= ISOFSMNT_NORRIP; } else { @@ -544,7 +544,7 @@ cd9660_unmount(mp, mntflags, td) int mntflags; struct thread *td; { - register struct iso_mnt *isomp; + struct iso_mnt *isomp; int error, flags = 0; if (mntflags & MNT_FORCE) @@ -586,7 +586,7 @@ cd9660_root(mp, vpp) struct iso_directory_record *dp = (struct iso_directory_record *)imp->root; ino_t ino = isodirino(dp, imp); - + /* * With RRIP we must use the `.' entry of the root directory. * Simply tell vget, that it's a relocated directory. @@ -601,10 +601,10 @@ cd9660_root(mp, vpp) static int cd9660_statfs(mp, sbp, td) struct mount *mp; - register struct statfs *sbp; + struct statfs *sbp; struct thread *td; { - register struct iso_mnt *isomp; + struct iso_mnt *isomp; isomp = VFSTOISOFS(mp); @@ -643,20 +643,20 @@ struct ifid { /* ARGSUSED */ static int cd9660_fhtovp(mp, fhp, vpp) - register struct mount *mp; + struct mount *mp; struct fid *fhp; struct vnode **vpp; { struct ifid *ifhp = (struct ifid *)fhp; - register struct iso_node *ip; + struct iso_node *ip; struct vnode *nvp; int error; - + #ifdef ISOFS_DBG printf("fhtovp: ino %d, start %ld\n", ifhp->ifid_ino, ifhp->ifid_start); #endif - + if ((error = VFS_VGET(mp, ifhp->ifid_ino, LK_EXCLUSIVE, &nvp)) != 0) { *vpp = NULLVP; return (error); @@ -731,7 +731,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) /* * Check to be sure that it did not show up. We have to put it - * on the hash chain as the cleanup from vput expects to find + * on the hash chain as the cleanup from vput expects to find * it there. */ if ((error = cd9660_ihashget(dev, ino, flags, vpp)) != 0 || @@ -758,7 +758,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) printf("fhtovp: lbn exceed volume space %d\n", lbn); return (ESTALE); } - + off = blkoff(imp, ino); if (off + ISO_DIRECTORY_RECORD_SIZE > imp->logical_block_size) { vput(vp); @@ -766,7 +766,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) off + ISO_DIRECTORY_RECORD_SIZE); return (ESTALE); } - + error = bread(imp->im_devvp, lbn << (imp->im_bshift - DEV_BSHIFT), imp->logical_block_size, NOCRED, &bp); @@ -788,7 +788,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) isonum_711(isodir->length)); return (ESTALE); } - + #if 0 if (isonum_733(isodir->extent) + isonum_711(isodir->ext_attr_length) != ifhp->ifid_start) { @@ -825,7 +825,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) ip->iso_extent = isonum_733(isodir->extent); ip->i_size = isonum_733(isodir->size); ip->iso_start = isonum_711(isodir->ext_attr_length) + ip->iso_extent; - + /* * Setup time stamp, attribute */ @@ -873,14 +873,14 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) default: break; } - + if (ip->iso_extent == imp->root_extent) vp->v_vflag |= VV_ROOT; /* * XXX need generation number? */ - + *vpp = vp; return (0); } @@ -894,8 +894,8 @@ cd9660_vptofh(vp, fhp) struct vnode *vp; struct fid *fhp; { - register struct iso_node *ip = VTOI(vp); - register struct ifid *ifhp; + struct iso_node *ip = VTOI(vp); + struct ifid *ifhp; ifhp = (struct ifid *)fhp; ifhp->ifid_len = sizeof(struct ifid); diff --git a/sys/isofs/cd9660/cd9660_lookup.c b/sys/isofs/cd9660/cd9660_lookup.c index 1080145..bbff6c1 100644 --- a/sys/isofs/cd9660/cd9660_lookup.c +++ b/sys/isofs/cd9660/cd9660_lookup.c @@ -90,9 +90,9 @@ cd9660_lookup(ap) struct componentname *a_cnp; } */ *ap; { - register struct vnode *vdp; /* vnode for directory being searched */ - register struct iso_node *dp; /* inode for directory being searched */ - register struct iso_mnt *imp; /* filesystem that directory is in */ + struct vnode *vdp; /* vnode for directory being searched */ + struct iso_node *dp; /* inode for directory being searched */ + struct iso_mnt *imp; /* filesystem that directory is in */ struct buf *bp; /* a buffer of directory entries */ struct iso_directory_record *ep = 0;/* the current directory entry */ int entryoffsetinblock; /* offset of ep in bp's buffer */ @@ -167,7 +167,7 @@ cd9660_lookup(ap) nchstats.ncs_2passes++; } endsearch = dp->i_size; - + searchloop: while (dp->i_offset < endsearch) { /* @@ -188,7 +188,7 @@ searchloop: */ ep = (struct iso_directory_record *) ((char *)bp->b_data + entryoffsetinblock); - + reclen = isonum_711(ep->length); if (reclen == 0) { /* skip to next block, if any */ @@ -204,7 +204,7 @@ searchloop: if (entryoffsetinblock + reclen > imp->logical_block_size) /* entries are not allowed to cross boundaries */ break; - + namelen = isonum_711(ep->name_len); isoflags = isonum_711(imp->iso_ftype == ISO_FTYPE_HIGH_SIERRA? &ep->date[6]: ep->flags); @@ -212,7 +212,7 @@ searchloop: if (reclen < ISO_DIRECTORY_RECORD_SIZE + namelen) /* illegal entry, stop */ break; - + /* * Check for a name match. */ @@ -317,7 +317,7 @@ notfound: found: if (numdirpasses == 2) nchstats.ncs_pass2++; - + /* * Found component in pathname. * If the final component of path name, save information @@ -408,7 +408,7 @@ cd9660_blkatoff(vp, offset, res, bpp) struct buf **bpp; { struct iso_node *ip; - register struct iso_mnt *imp; + struct iso_mnt *imp; struct buf *bp; daddr_t lbn; int bsize, bshift, error; diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c index 687ec66..5091378 100644 --- a/sys/isofs/cd9660/cd9660_node.c +++ b/sys/isofs/cd9660/cd9660_node.c @@ -149,9 +149,9 @@ cd9660_ihashins(ip) */ static void cd9660_ihashrem(ip) - register struct iso_node *ip; + struct iso_node *ip; { - register struct iso_node *iq; + struct iso_node *iq; mtx_lock(&cd9660_ihash_mtx); if ((iq = ip->i_next) != NULL) @@ -177,7 +177,7 @@ cd9660_inactive(ap) { struct vnode *vp = ap->a_vp; struct thread *td = ap->a_td; - register struct iso_node *ip = VTOI(vp); + struct iso_node *ip = VTOI(vp); int error = 0; if (prtactive && vrefcnt(vp) != 0) @@ -204,8 +204,8 @@ cd9660_reclaim(ap) struct thread *a_td; } */ *ap; { - register struct vnode *vp = ap->a_vp; - register struct iso_node *ip = VTOI(vp); + struct vnode *vp = ap->a_vp; + struct iso_node *ip = VTOI(vp); if (prtactive && vrefcnt(vp) != 0) vprint("cd9660_reclaim: pushing active", vp); @@ -262,7 +262,7 @@ cd9660_defattr(isodir, inop, bp, ftype) } if (bp) { ap = (struct iso_extended_attributes *)bp->b_data; - + if (isonum_711(ap->version) == 1) { if (!(ap->perm[0]&0x40)) inop->inode.iso_mode |= VEXEC >> 6; @@ -314,7 +314,7 @@ cd9660_deftstamp(isodir,inop,bp,ftype) } if (bp) { ap = (struct iso_extended_attributes *)bp->b_data; - + if (ftype != ISO_FTYPE_HIGH_SIERRA && isonum_711(ap->version) == 1) { if (!cd9660_tstamp_conv17(ap->ftime,&inop->inode.iso_atime)) @@ -389,7 +389,7 @@ cd9660_chars2ui(begin,len) int len; { u_int rc; - + for (rc = 0; --len >= 0;) { rc *= 10; rc += *begin++ - '0'; @@ -403,7 +403,7 @@ cd9660_tstamp_conv17(pi,pu) struct timespec *pu; { u_char buf[7]; - + /* year:"0001"-"9999" -> -1900 */ buf[0] = cd9660_chars2ui(pi,4) - 1900; diff --git a/sys/isofs/cd9660/cd9660_rrip.c b/sys/isofs/cd9660/cd9660_rrip.c index f20b4db..aae7394 100644 --- a/sys/isofs/cd9660/cd9660_rrip.c +++ b/sys/isofs/cd9660/cd9660_rrip.c @@ -113,8 +113,8 @@ cd9660_rrip_slink(p,ana) ISO_RRIP_SLINK *p; ISO_RRIP_ANALYZE *ana; { - register ISO_RRIP_SLINK_COMPONENT *pcomp; - register ISO_RRIP_SLINK_COMPONENT *pcompe; + ISO_RRIP_SLINK_COMPONENT *pcomp; + ISO_RRIP_SLINK_COMPONENT *pcompe; int len, wlen, cont; char *outbuf, *inbuf; @@ -337,7 +337,7 @@ cd9660_rrip_tstamp(p,ana) ISO_RRIP_ANALYZE *ana; { u_char *ptime; - + ptime = p->time; /* Check a format of time stamp (7bytes/17bytes) */ @@ -351,7 +351,7 @@ cd9660_rrip_tstamp(p,ana) ptime += 7; } else bzero(&ana->inop->inode.iso_mtime,sizeof(struct timespec)); - + if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) { cd9660_tstamp_conv7(ptime,&ana->inop->inode.iso_atime, ISO_FTYPE_RRIP); @@ -374,7 +374,7 @@ cd9660_rrip_tstamp(p,ana) ptime += 17; } else bzero(&ana->inop->inode.iso_mtime,sizeof(struct timespec)); - + if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) { cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_atime); ptime += 17; @@ -408,10 +408,10 @@ cd9660_rrip_device(p,ana) ISO_RRIP_ANALYZE *ana; { u_int high, low; - + high = isonum_733(p->dev_t_high); low = isonum_733(p->dev_t_low); - + if (high == 0) ana->inop->inode.iso_rdev = makedev(umajor(low), uminor(low)); else @@ -483,9 +483,9 @@ cd9660_rrip_loop(isodir,ana,table) ISO_RRIP_ANALYZE *ana; RRIP_TABLE *table; { - register RRIP_TABLE *ptable; - register ISO_SUSP_HEADER *phead; - register ISO_SUSP_HEADER *pend; + RRIP_TABLE *ptable; + ISO_SUSP_HEADER *phead; + ISO_SUSP_HEADER *pend; struct buf *bp = NULL; char *pwhead; u_short c; @@ -541,7 +541,7 @@ cd9660_rrip_loop(isodir,ana,table) */ phead = (ISO_SUSP_HEADER *)((char *)phead + isonum_711(phead->length)); } - + if (ana->fields && ana->iso_ce_len) { if (ana->iso_ce_blk >= ana->imp->volume_space_size || ana->iso_ce_off + ana->iso_ce_len > ana->imp->logical_block_size @@ -601,7 +601,7 @@ cd9660_rrip_analyze(isodir,inop,imp) return cd9660_rrip_loop(isodir,&analyze,rrip_table_analyze); } -/* +/* * Get Alternate Name. */ static RRIP_TABLE rrip_table_getname[] = { @@ -648,7 +648,7 @@ cd9660_rrip_getname(isodir,outbuf,outlen,inump,imp) return cd9660_rrip_loop(isodir,&analyze,tab); } -/* +/* * Get Symbolic Link. */ static RRIP_TABLE rrip_table_getsymname[] = { diff --git a/sys/isofs/cd9660/cd9660_rrip.h b/sys/isofs/cd9660/cd9660_rrip.h index de50bb5..f6fa050 100644 --- a/sys/isofs/cd9660/cd9660_rrip.h +++ b/sys/isofs/cd9660/cd9660_rrip.h @@ -34,13 +34,13 @@ * @(#)cd9660_rrip.h 8.2 (Berkeley) 12/5/94 * $FreeBSD$ */ - + typedef struct { char type [ISODCL ( 0, 1)]; u_char length [ISODCL ( 2, 2)]; /* 711 */ u_char version [ISODCL ( 3, 3)]; } ISO_SUSP_HEADER; - + typedef struct { ISO_SUSP_HEADER h; char mode [ISODCL ( 4, 11)]; /* 733 */ @@ -48,13 +48,13 @@ typedef struct { char uid [ISODCL ( 20, 27)]; /* 733 */ char gid [ISODCL ( 28, 35)]; /* 733 */ } ISO_RRIP_ATTR; - + typedef struct { ISO_SUSP_HEADER h; char dev_t_high [ISODCL ( 4, 11)]; /* 733 */ char dev_t_low [ISODCL ( 12, 19)]; /* 733 */ } ISO_RRIP_DEVICE; - + #define ISO_SUSP_CFLAG_CONTINUE 0x01 #define ISO_SUSP_CFLAG_CURRENT 0x02 #define ISO_SUSP_CFLAG_PARENT 0x04 diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index dc0b240..e91f4b1 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -179,7 +179,7 @@ iso_mountroot(mp, td) */ static int cd9660_mount(mp, path, data, ndp, td) - register struct mount *mp; + struct mount *mp; char *path; caddr_t data; struct nameidata *ndp; @@ -224,14 +224,14 @@ cd9660_mount(mp, path, data, ndp, td) return (error); } - /* + /* * Verify that user has necessary permissions on the device, * or has superuser abilities */ accessmode = VREAD; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); error = VOP_ACCESS(devvp, accessmode, td->td_ucred, td); - if (error) + if (error) error = suser(td); if (error) { vput(devvp); @@ -264,12 +264,12 @@ cd9660_mount(mp, path, data, ndp, td) */ static int iso_mountfs(devvp, mp, td, argp) - register struct vnode *devvp; + struct vnode *devvp; struct mount *mp; struct thread *td; struct iso_args *argp; { - register struct iso_mnt *isomp = (struct iso_mnt *)0; + struct iso_mnt *isomp = (struct iso_mnt *)0; struct buf *bp = NULL; struct buf *pribp = NULL, *supbp = NULL; struct cdev *dev = devvp->v_rdev; @@ -327,7 +327,7 @@ iso_mountfs(devvp, mp, td, argp) if ((error = bread(devvp, iso_blknum * btodb(iso_bsize), iso_bsize, NOCRED, &bp)) != 0) goto out; - + vdp = (struct iso_volume_descriptor *)bp->b_data; if (bcmp (vdp->id, ISO_STANDARD_ID, sizeof vdp->id) != 0) { if (bcmp (vdp->id_sierra, ISO_SIERRA_ID, @@ -452,9 +452,9 @@ iso_mountfs(devvp, mp, td, argp) (isomp->im_bshift - DEV_BSHIFT), isomp->logical_block_size, NOCRED, &bp)) != 0) goto out; - + rootp = (struct iso_directory_record *)bp->b_data; - + if ((isomp->rr_skip = cd9660_rrip_offset(rootp,isomp)) < 0) { argp->flags |= ISOFSMNT_NORRIP; } else { @@ -544,7 +544,7 @@ cd9660_unmount(mp, mntflags, td) int mntflags; struct thread *td; { - register struct iso_mnt *isomp; + struct iso_mnt *isomp; int error, flags = 0; if (mntflags & MNT_FORCE) @@ -586,7 +586,7 @@ cd9660_root(mp, vpp) struct iso_directory_record *dp = (struct iso_directory_record *)imp->root; ino_t ino = isodirino(dp, imp); - + /* * With RRIP we must use the `.' entry of the root directory. * Simply tell vget, that it's a relocated directory. @@ -601,10 +601,10 @@ cd9660_root(mp, vpp) static int cd9660_statfs(mp, sbp, td) struct mount *mp; - register struct statfs *sbp; + struct statfs *sbp; struct thread *td; { - register struct iso_mnt *isomp; + struct iso_mnt *isomp; isomp = VFSTOISOFS(mp); @@ -643,20 +643,20 @@ struct ifid { /* ARGSUSED */ static int cd9660_fhtovp(mp, fhp, vpp) - register struct mount *mp; + struct mount *mp; struct fid *fhp; struct vnode **vpp; { struct ifid *ifhp = (struct ifid *)fhp; - register struct iso_node *ip; + struct iso_node *ip; struct vnode *nvp; int error; - + #ifdef ISOFS_DBG printf("fhtovp: ino %d, start %ld\n", ifhp->ifid_ino, ifhp->ifid_start); #endif - + if ((error = VFS_VGET(mp, ifhp->ifid_ino, LK_EXCLUSIVE, &nvp)) != 0) { *vpp = NULLVP; return (error); @@ -731,7 +731,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) /* * Check to be sure that it did not show up. We have to put it - * on the hash chain as the cleanup from vput expects to find + * on the hash chain as the cleanup from vput expects to find * it there. */ if ((error = cd9660_ihashget(dev, ino, flags, vpp)) != 0 || @@ -758,7 +758,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) printf("fhtovp: lbn exceed volume space %d\n", lbn); return (ESTALE); } - + off = blkoff(imp, ino); if (off + ISO_DIRECTORY_RECORD_SIZE > imp->logical_block_size) { vput(vp); @@ -766,7 +766,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) off + ISO_DIRECTORY_RECORD_SIZE); return (ESTALE); } - + error = bread(imp->im_devvp, lbn << (imp->im_bshift - DEV_BSHIFT), imp->logical_block_size, NOCRED, &bp); @@ -788,7 +788,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) isonum_711(isodir->length)); return (ESTALE); } - + #if 0 if (isonum_733(isodir->extent) + isonum_711(isodir->ext_attr_length) != ifhp->ifid_start) { @@ -825,7 +825,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) ip->iso_extent = isonum_733(isodir->extent); ip->i_size = isonum_733(isodir->size); ip->iso_start = isonum_711(isodir->ext_attr_length) + ip->iso_extent; - + /* * Setup time stamp, attribute */ @@ -873,14 +873,14 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) default: break; } - + if (ip->iso_extent == imp->root_extent) vp->v_vflag |= VV_ROOT; /* * XXX need generation number? */ - + *vpp = vp; return (0); } @@ -894,8 +894,8 @@ cd9660_vptofh(vp, fhp) struct vnode *vp; struct fid *fhp; { - register struct iso_node *ip = VTOI(vp); - register struct ifid *ifhp; + struct iso_node *ip = VTOI(vp); + struct ifid *ifhp; ifhp = (struct ifid *)fhp; ifhp->ifid_len = sizeof(struct ifid); -- cgit v1.1