summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-03-02 15:56:49 +0000
committerdes <des@FreeBSD.org>2003-03-02 15:56:49 +0000
commit7b016a11e606d722eb050e0f5b2da9797f9d4b2a (patch)
tree9d914583b19df0e7843f6931745ec9d08a2c4793 /sys/fs
parent765ebc59b49b789f220d5975fee1fafe86545825 (diff)
downloadFreeBSD-src-7b016a11e606d722eb050e0f5b2da9797f9d4b2a.zip
FreeBSD-src-7b016a11e606d722eb050e0f5b2da9797f9d4b2a.tar.gz
Clean up whitespace, s/register //, refrain from strong urge to ANSIfy.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/cd9660/cd9660_vnops.c50
-rw-r--r--sys/fs/devfs/devfs_vnops.c28
-rw-r--r--sys/fs/fdescfs/fdesc_vnops.c2
-rw-r--r--sys/fs/msdosfs/msdosfs_vnops.c28
-rw-r--r--sys/fs/nwfs/nwfs_io.c10
-rw-r--r--sys/fs/smbfs/smbfs_io.c10
-rw-r--r--sys/fs/udf/udf_vnops.c12
7 files changed, 70 insertions, 70 deletions
diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c
index b496c5f..6fa1677 100644
--- a/sys/fs/cd9660/cd9660_vnops.c
+++ b/sys/fs/cd9660/cd9660_vnops.c
@@ -91,21 +91,21 @@ cd9660_setattr(ap)
struct vnode *vp = ap->a_vp;
struct vattr *vap = ap->a_vap;
- if (vap->va_flags != (u_long)VNOVAL || vap->va_uid != (uid_t)VNOVAL ||
+ if (vap->va_flags != (u_long)VNOVAL || vap->va_uid != (uid_t)VNOVAL ||
vap->va_gid != (gid_t)VNOVAL || vap->va_atime.tv_sec != VNOVAL ||
vap->va_mtime.tv_sec != VNOVAL || vap->va_mode != (mode_t)VNOVAL)
return (EROFS);
if (vap->va_size != (u_quad_t)VNOVAL) {
- switch (vp->v_type) {
- case VDIR:
- return (EISDIR);
+ switch (vp->v_type) {
+ case VDIR:
+ return (EISDIR);
case VLNK:
case VREG:
return (EROFS);
- case VCHR:
- case VBLK:
- case VSOCK:
- case VFIFO:
+ case VCHR:
+ case VBLK:
+ case VSOCK:
+ case VFIFO:
case VNON:
case VBAD:
return (0);
@@ -165,8 +165,8 @@ cd9660_getattr(ap)
{
struct vnode *vp = ap->a_vp;
- register struct vattr *vap = ap->a_vap;
- register struct iso_node *ip = VTOI(vp);
+ struct vattr *vap = ap->a_vap;
+ struct iso_node *ip = VTOI(vp);
vap->va_fsid = dev2udev(ip->i_dev);
@@ -237,14 +237,14 @@ cd9660_ioctl(ap)
struct vnode *vp = ap->a_vp;
struct iso_node *ip = VTOI(vp);
- switch (ap->a_command) {
+ switch (ap->a_command) {
- case FIOGETLBA:
+ case FIOGETLBA:
*(int *)(ap->a_data) = ip->iso_start;
return 0;
- default:
- return (ENOTTY);
- }
+ default:
+ return (ENOTTY);
+ }
}
/*
@@ -260,9 +260,9 @@ cd9660_read(ap)
} */ *ap;
{
struct vnode *vp = ap->a_vp;
- register struct uio *uio = ap->a_uio;
- register struct iso_node *ip = VTOI(vp);
- register struct iso_mnt *imp;
+ struct uio *uio = ap->a_uio;
+ struct iso_node *ip = VTOI(vp);
+ struct iso_mnt *imp;
struct buf *bp;
daddr_t lbn, rablock;
off_t diff;
@@ -293,7 +293,7 @@ cd9660_read(ap)
if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) {
if (lblktosize(imp, rablock) < ip->i_size)
error = cluster_read(vp, (off_t)ip->i_size,
- lbn, size, NOCRED, uio->uio_resid,
+ lbn, size, NOCRED, uio->uio_resid,
(ap->a_ioflag >> 16), &bp);
else
error = bread(vp, lbn, size, NOCRED, &bp);
@@ -431,7 +431,7 @@ cd9660_readdir(ap)
u_long *a_cookies;
} */ *ap;
{
- register struct uio *uio = ap->a_uio;
+ struct uio *uio = ap->a_uio;
struct isoreaddir *idp;
struct vnode *vdp = ap->a_vp;
struct iso_node *dp;
@@ -672,7 +672,7 @@ cd9660_readlink(ap)
symname = uio->uio_iov->iov_base;
else
symname = uma_zalloc(namei_zone, M_WAITOK);
-
+
/*
* Ok, we just gathering a symbolic name in SL record.
*/
@@ -712,15 +712,15 @@ cd9660_strategy(ap)
struct buf *a_bp;
} */ *ap;
{
- register struct buf *bp = ap->a_bp;
- register struct vnode *vp = bp->b_vp;
- register struct iso_node *ip;
+ struct buf *bp = ap->a_bp;
+ struct vnode *vp = bp->b_vp;
+ struct iso_node *ip;
ip = VTOI(vp);
if (vp->v_type == VBLK || vp->v_type == VCHR)
panic("cd9660_strategy: spec");
if (bp->b_blkno == bp->b_lblkno) {
- bp->b_blkno = (ip->iso_start + bp->b_lblkno) <<
+ bp->b_blkno = (ip->iso_start + bp->b_lblkno) <<
(ip->i_mnt->im_bshift - DEV_BSHIFT);
if ((long)bp->b_blkno == -1) /* XXX: cut&paste junk ? */
clrbuf(bp);
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index 81cf8df..a9bace7 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -37,7 +37,7 @@
/*
* TODO:
* remove empty directories
- * mknod: hunt down DE_DELETED, compare name, reinstantiate.
+ * mknod: hunt down DE_DELETED, compare name, reinstantiate.
* mkdir: want it ?
*/
@@ -84,7 +84,7 @@ static vop_t **devfs_specop_p;
/*
* Construct the fully qualified path name relative to the mountpoint
- */
+ */
static char *
devfs_fqpn(char *buf, struct vnode *dvp, struct componentname *cnp)
{
@@ -223,7 +223,7 @@ devfs_getattr(ap)
vap->va_uid = de->de_uid;
vap->va_gid = de->de_gid;
vap->va_mode = de->de_mode;
- if (vp->v_type == VLNK)
+ if (vp->v_type == VLNK)
vap->va_size = de->de_dirent->d_namlen;
else if (vp->v_type == VDIR)
vap->va_size = vap->va_bytes = DEV_BSIZE;
@@ -312,7 +312,7 @@ devfs_lookupx(ap)
dmp = VFSTODEVFS(dvp->v_mount);
cloned = 0;
dd = dvp->v_data;
-
+
*vpp = NULLVP;
cnp->cn_flags &= ~PDIRUNLOCK;
@@ -453,11 +453,11 @@ static int
devfs_mknod(struct vop_mknod_args *ap)
/*
struct vop_mknod_args {
- struct vnodeop_desc *a_desc;
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- struct vattr *a_vap;
+ struct vnodeop_desc *a_desc;
+ struct vnode *a_dvp;
+ struct vnode **a_vpp;
+ struct componentname *a_cnp;
+ struct vattr *a_vap;
};
*/
{
@@ -480,7 +480,7 @@ struct vop_mknod_args {
nameiop = cnp->cn_nameiop;
cloned = 0;
dd = dvp->v_data;
-
+
error = ENOENT;
TAILQ_FOREACH(de, &dd->de_dlist, de_list) {
if (cnp->cn_namelen != de->de_dirent->d_namlen)
@@ -587,7 +587,7 @@ devfs_readdir(ap)
off = 0;
oldoff = uio->uio_offset;
TAILQ_FOREACH(dd, &de->de_dlist, de_list) {
- if (dd->de_flags & DE_WHITEOUT)
+ if (dd->de_flags & DE_WHITEOUT)
continue;
if (dd->de_dirent->d_type == DT_DIR)
de = dd->de_dir;
@@ -607,13 +607,13 @@ devfs_readdir(ap)
}
if( !error && ap->a_ncookies != NULL && ap->a_cookies != NULL ) {
MALLOC(cookiebuf, u_long *, ncookies * sizeof(u_long),
- M_TEMP, M_WAITOK);
+ M_TEMP, M_WAITOK);
cookiep = cookiebuf;
dps = (struct dirent *)((char *)uio->uio_iov->iov_base -
(uio->uio_offset - oldoff));
dpe = (struct dirent *) uio->uio_iov->iov_base;
- for( dp = dps;
- dp < dpe;
+ for( dp = dps;
+ dp < dpe;
dp = (struct dirent *)((caddr_t) dp + dp->d_reclen)) {
oldoff += dp->d_reclen;
*cookiep++ = (u_long) oldoff;
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c
index 527987b..152f8f7 100644
--- a/sys/fs/fdescfs/fdesc_vnops.c
+++ b/sys/fs/fdescfs/fdesc_vnops.c
@@ -189,7 +189,7 @@ fdesc_lookup(ap)
VOP_UNLOCK(dvp, 0, td);
if (cnp->cn_namelen == 1 && *pname == '.') {
*vpp = dvp;
- VREF(dvp);
+ VREF(dvp);
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td);
return (0);
}
diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c
index 3d439d3..e1bf75a 100644
--- a/sys/fs/msdosfs/msdosfs_vnops.c
+++ b/sys/fs/msdosfs/msdosfs_vnops.c
@@ -406,7 +406,7 @@ msdosfs_setattr(ap)
if (vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (gid_t)VNOVAL) {
uid_t uid;
gid_t gid;
-
+
if (vp->v_mount->mnt_flag & MNT_RDONLY)
return (EROFS);
uid = vap->va_uid;
@@ -523,7 +523,7 @@ msdosfs_read(ap)
return (EINVAL);
if ((uoff_t)uio->uio_offset > DOS_FILESIZE_MAX)
- return (0);
+ return (0);
/*
* If they didn't ask for any data, then we are done.
*/
@@ -559,7 +559,7 @@ msdosfs_read(ap)
de_cn2off(pmp, rablock) < dep->de_FileSize) {
rasize = pmp->pm_bpcluster;
error = breadn(vp, lbn, blsize,
- &rablock, &rasize, 1, NOCRED, &bp);
+ &rablock, &rasize, 1, NOCRED, &bp);
} else {
error = bread(vp, lbn, blsize, NOCRED, &bp);
}
@@ -653,7 +653,7 @@ msdosfs_write(ap)
}
if ((uoff_t)uio->uio_offset + uio->uio_resid > DOS_FILESIZE_MAX)
- return (EFBIG);
+ return (EFBIG);
/*
* If the offset we are starting the write at is beyond the end of
@@ -703,8 +703,8 @@ msdosfs_write(ap)
bn = de_cluster(pmp, uio->uio_offset);
if ((uio->uio_offset & pmp->pm_crbomask) == 0
- && (de_cluster(pmp, uio->uio_offset + uio->uio_resid)
- > de_cluster(pmp, uio->uio_offset)
+ && (de_cluster(pmp, uio->uio_offset + uio->uio_resid)
+ > de_cluster(pmp, uio->uio_offset)
|| uio->uio_offset + uio->uio_resid >= dep->de_FileSize)) {
/*
* If either the whole cluster gets written,
@@ -1229,17 +1229,17 @@ static struct {
} dosdirtemplate = {
{ ". ", " ", /* the . entry */
ATTR_DIRECTORY, /* file attribute */
- 0, /* reserved */
+ 0, /* reserved */
0, { 0, 0 }, { 0, 0 }, /* create time & date */
{ 0, 0 }, /* access date */
{ 0, 0 }, /* high bits of start cluster */
{ 210, 4 }, { 210, 4 }, /* modify time & date */
{ 0, 0 }, /* startcluster */
- { 0, 0, 0, 0 } /* filesize */
+ { 0, 0, 0, 0 } /* filesize */
},
{ ".. ", " ", /* the .. entry */
ATTR_DIRECTORY, /* file attribute */
- 0, /* reserved */
+ 0, /* reserved */
0, { 0, 0 }, { 0, 0 }, /* create time & date */
{ 0, 0 }, /* access date */
{ 0, 0 }, /* high bits of start cluster */
@@ -1370,13 +1370,13 @@ msdosfs_rmdir(ap)
struct componentname *a_cnp;
} */ *ap;
{
- register struct vnode *vp = ap->a_vp;
- register struct vnode *dvp = ap->a_dvp;
- register struct componentname *cnp = ap->a_cnp;
- register struct denode *ip, *dp;
+ struct vnode *vp = ap->a_vp;
+ struct vnode *dvp = ap->a_dvp;
+ struct componentname *cnp = ap->a_cnp;
+ struct denode *ip, *dp;
struct thread *td = cnp->cn_thread;
int error;
-
+
ip = VTODE(vp);
dp = VTODE(dvp);
diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c
index cca1c2e..c282f58 100644
--- a/sys/fs/nwfs/nwfs_io.c
+++ b/sys/fs/nwfs/nwfs_io.c
@@ -124,7 +124,7 @@ nwfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred) {
#if 0
if (error && eofflag) {
/* *eofflag = 1;*/
- break;
+ break;
}
#endif
break;
@@ -137,7 +137,7 @@ nwfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred) {
VTONW(newvp)->n_ctime = VTONW(newvp)->n_vattr.va_ctime.tv_sec;
cn.cn_nameptr = dp.d_name;
cn.cn_namelen = dp.d_namlen;
- cache_enter(vp, newvp, &cn);
+ cache_enter(vp, newvp, &cn);
vput(newvp);
} else
error = 0;
@@ -343,7 +343,7 @@ nwfs_doio(bp, cr, td)
* the block is reused. This is indicated by setting
* the B_DELWRI and B_NEEDCOMMIT flags.
*/
- if (error == EINTR
+ if (error == EINTR
|| (!error && (bp->b_flags & B_NEEDCOMMIT))) {
int s;
@@ -358,7 +358,7 @@ nwfs_doio(bp, cr, td)
if ((bp->b_flags & B_ASYNC) == 0)
bp->b_flags |= B_EINTR;
splx(s);
- } else {
+ } else {
if (error) {
bp->b_ioflags |= BIO_ERROR;
bp->b_error /*= np->n_error */= error;
@@ -467,7 +467,7 @@ nwfs_getpages(ap)
int nvalid = ((size + DEV_BSIZE - 1) - toff) & ~(DEV_BSIZE - 1);
vm_page_set_validclean(m, 0, nvalid);
}
-
+
if (i != ap->a_reqpage) {
/*
* Whether or not to leave the page activated is up in
diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c
index 11c1e3c..6c69090 100644
--- a/sys/fs/smbfs/smbfs_io.c
+++ b/sys/fs/smbfs/smbfs_io.c
@@ -92,7 +92,7 @@ smbfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred)
np = VTOSMB(vp);
SMBVDEBUG("dirname='%s'\n", np->n_name);
smb_makescred(&scred, uio->uio_td, cred);
- offset = uio->uio_offset / DE_SIZE; /* offset in the directory */
+ offset = uio->uio_offset / DE_SIZE; /* offset in the directory */
limit = uio->uio_resid / DE_SIZE;
if (uio->uio_resid < DE_SIZE || uio->uio_offset < 0)
return EINVAL;
@@ -161,7 +161,7 @@ smbfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred)
if (!error) {
cn.cn_nameptr = de.d_name;
cn.cn_namelen = de.d_namlen;
- cache_enter(vp, newvp, &cn);
+ cache_enter(vp, newvp, &cn);
vput(newvp);
}
}
@@ -367,7 +367,7 @@ smbfs_doio(struct buf *bp, struct ucred *cr, struct thread *td)
* the block is reused. This is indicated by setting
* the B_DELWRI and B_NEEDCOMMIT flags.
*/
- if (error == EINTR
+ if (error == EINTR
|| (!error && (bp->b_flags & B_NEEDCOMMIT))) {
int s;
@@ -382,7 +382,7 @@ smbfs_doio(struct buf *bp, struct ucred *cr, struct thread *td)
if ((bp->b_flags & B_ASYNC) == 0)
bp->b_flags |= B_EINTR;
splx(s);
- } else {
+ } else {
if (error) {
bp->b_ioflags |= BIO_ERROR;
bp->b_error = error;
@@ -531,7 +531,7 @@ smbfs_getpages(ap)
*/
;
}
-
+
if (i != reqpage) {
/*
* Whether or not to leave the page activated is up in
diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c
index c5d8d36..45aff3d 100644
--- a/sys/fs/udf/udf_vnops.c
+++ b/sys/fs/udf/udf_vnops.c
@@ -188,7 +188,7 @@ udf_permtomode(struct udf_node *node)
return (mode);
}
-
+
static int
udf_access(struct vop_access_args *a)
{
@@ -266,7 +266,7 @@ udf_timetotimespec(struct timestamp *time, struct timespec *t)
/* Calclulate the month */
lpyear = udf_isaleapyear(time->year);
for (i = 1; i < time->month; i++)
- t->tv_sec += mon_lens[lpyear][i] * 3600 * 24;
+ t->tv_sec += mon_lens[lpyear][i] * 3600 * 24;
/* Speed up the calculation */
if (time->year > 1979)
@@ -458,7 +458,7 @@ udf_transname(char *cs0string, char *destname, int len)
}
/* At this point, the name is in 16-bit Unicode. Compact it down
- * to 8-bit
+ * to 8-bit
*/
for (i = 0; i < unilen ; i++) {
if (transname[i] & 0xff00) {
@@ -739,7 +739,7 @@ udf_readdir(struct vop_readdir_args *a)
dir.d_namlen = 1;
dir.d_reclen = GENERIC_DIRSIZ(&dir);
uiodir.dirent = &dir;
- error = udf_uiodir(&uiodir, dir.d_reclen, uio, 1);
+ error = udf_uiodir(&uiodir, dir.d_reclen, uio, 1);
if (error)
break;
@@ -1032,7 +1032,7 @@ udf_reclaim(struct vop_reclaim_args *a)
}
/*
- * Read the block and then set the data pointer to correspond with the
+ * Read the block and then set the data pointer to correspond with the
* offset passed in. Only read in at most 'size' bytes, and then set 'size'
* to the number of bytes pointed to. If 'size' is zero, try to read in a
* whole extent.
@@ -1157,7 +1157,7 @@ udf_bmap_internal(struct udf_node *node, uint32_t offset, daddr_t *sector, uint3
ad_num++;
} while(offset >= icblen);
- lsector = (offset >> udfmp->bshift) +
+ lsector = (offset >> udfmp->bshift) +
((struct long_ad *)(icb))->loc.lb_num;
*max_size = GETICBLEN(long_ad, icb) - offset;
OpenPOWER on IntegriCloud