diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 08:16:23 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 08:16:23 +0000 |
commit | c86f0c7a71e7ade3e38b325c186a9cf374e0411e (patch) | |
tree | 176f04f674860c7cfae9ac5d2ff4d4e1d73cb2b7 /sys/fs/msdosfs | |
parent | 423ba8f9bc23d93bfc244aca9b12563b1c9de90d (diff) | |
download | FreeBSD-src-c86f0c7a71e7ade3e38b325c186a9cf374e0411e.zip FreeBSD-src-c86f0c7a71e7ade3e38b325c186a9cf374e0411e.tar.gz |
Remove trailing whitespace.
Diffstat (limited to 'sys/fs/msdosfs')
-rw-r--r-- | sys/fs/msdosfs/bootsect.h | 10 | ||||
-rw-r--r-- | sys/fs/msdosfs/bpb.h | 10 | ||||
-rw-r--r-- | sys/fs/msdosfs/denode.h | 10 | ||||
-rw-r--r-- | sys/fs/msdosfs/direntry.h | 10 | ||||
-rw-r--r-- | sys/fs/msdosfs/fat.h | 10 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_conv.c | 10 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_denode.c | 42 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_fat.c | 64 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_lookup.c | 10 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 16 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vnops.c | 54 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfsmount.h | 36 |
12 files changed, 141 insertions, 141 deletions
diff --git a/sys/fs/msdosfs/bootsect.h b/sys/fs/msdosfs/bootsect.h index 099b15f..f83b9ec 100644 --- a/sys/fs/msdosfs/bootsect.h +++ b/sys/fs/msdosfs/bootsect.h @@ -1,19 +1,19 @@ -/* $Id$ */ +/* $Id: bootsect.h,v 1.1 1994/09/19 15:41:36 dfr Exp $ */ /* $NetBSD: bootsect.h,v 1.4 1994/06/29 06:35:28 cgd Exp $ */ /* * Written by Paul Popelka (paulp@uts.amdahl.com) - * + * * You can do anything you want with this software, just don't say you wrote * it, and don't remove this notice. - * + * * This software is provided "as is". - * + * * The author supplies this software to be publicly redistributed on the * understanding that the author is not responsible for the correct * functioning of this software in any circumstances and is not liable for * any damages caused by this software. - * + * * October 1992 */ diff --git a/sys/fs/msdosfs/bpb.h b/sys/fs/msdosfs/bpb.h index 70e4de2..7618126 100644 --- a/sys/fs/msdosfs/bpb.h +++ b/sys/fs/msdosfs/bpb.h @@ -1,19 +1,19 @@ -/* $Id$ */ +/* $Id: bpb.h,v 1.1 1994/09/19 15:41:37 dfr Exp $ */ /* $NetBSD: bpb.h,v 1.3 1994/06/29 06:35:29 cgd Exp $ */ /* * Written by Paul Popelka (paulp@uts.amdahl.com) - * + * * You can do anything you want with this software, just don't say you wrote * it, and don't remove this notice. - * + * * This software is provided "as is". - * + * * The author supplies this software to be publicly redistributed on the * understanding that the author is not responsible for the correct * functioning of this software in any circumstances and is not liable for * any damages caused by this software. - * + * * October 1992 */ diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h index b47196a..a7f2928 100644 --- a/sys/fs/msdosfs/denode.h +++ b/sys/fs/msdosfs/denode.h @@ -1,4 +1,4 @@ -/* $Id: denode.h,v 1.3 1994/12/27 12:37:33 bde Exp $ */ +/* $Id: denode.h,v 1.4 1995/03/16 18:14:17 bde Exp $ */ /* $NetBSD: denode.h,v 1.8 1994/08/21 18:43:49 ws Exp $ */ /*- @@ -34,17 +34,17 @@ */ /* * Written by Paul Popelka (paulp@uts.amdahl.com) - * + * * You can do anything you want with this software, just don't say you wrote * it, and don't remove this notice. - * + * * This software is provided "as is". - * + * * The author supplies this software to be publicly redistributed on the * understanding that the author is not responsible for the correct * functioning of this software in any circumstances and is not liable for * any damages caused by this software. - * + * * October 1992 */ diff --git a/sys/fs/msdosfs/direntry.h b/sys/fs/msdosfs/direntry.h index d2ec019..f4eecac 100644 --- a/sys/fs/msdosfs/direntry.h +++ b/sys/fs/msdosfs/direntry.h @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: direntry.h,v 1.1 1994/09/19 15:41:39 dfr Exp $ */ /* $NetBSD: direntry.h,v 1.7 1994/08/21 18:43:54 ws Exp $ */ /*- @@ -34,17 +34,17 @@ */ /* * Written by Paul Popelka (paulp@uts.amdahl.com) - * + * * You can do anything you want with this software, just don't say you wrote * it, and don't remove this notice. - * + * * This software is provided "as is". - * + * * The author supplies this software to be publicly redistributed on the * understanding that the author is not responsible for the correct * functioning of this software in any circumstances and is not liable for * any damages caused by this software. - * + * * October 1992 */ diff --git a/sys/fs/msdosfs/fat.h b/sys/fs/msdosfs/fat.h index b5f223f..3b043c1 100644 --- a/sys/fs/msdosfs/fat.h +++ b/sys/fs/msdosfs/fat.h @@ -1,4 +1,4 @@ -/* $Id: fat.h,v 1.1 1994/09/19 15:41:40 dfr Exp $ */ +/* $Id: fat.h,v 1.2 1994/09/27 20:42:41 phk Exp $ */ /* $NetBSD: fat.h,v 1.4 1994/08/21 18:43:57 ws Exp $ */ /*- @@ -34,17 +34,17 @@ */ /* * Written by Paul Popelka (paulp@uts.amdahl.com) - * + * * You can do anything you want with this software, just don't say you wrote * it, and don't remove this notice. - * + * * This software is provided "as is". - * + * * The author supplies this software to be publicly redistributed on the * understanding that the author is not responsible for the correct * functioning of this software in any circumstances and is not liable for * any damages caused by this software. - * + * * October 1992 */ diff --git a/sys/fs/msdosfs/msdosfs_conv.c b/sys/fs/msdosfs/msdosfs_conv.c index d351a48..8899982 100644 --- a/sys/fs/msdosfs/msdosfs_conv.c +++ b/sys/fs/msdosfs/msdosfs_conv.c @@ -1,19 +1,19 @@ -/* $Id: msdosfs_conv.c,v 1.3 1994/12/12 12:35:42 bde Exp $ */ +/* $Id: msdosfs_conv.c,v 1.4 1995/03/29 18:48:06 ache Exp $ */ /* $NetBSD: msdosfs_conv.c,v 1.6.2.1 1994/08/30 02:27:57 cgd Exp $ */ /* * Written by Paul Popelka (paulp@uts.amdahl.com) - * + * * You can do anything you want with this software, just don't say you wrote * it, and don't remove this notice. - * + * * This software is provided "as is". - * + * * The author supplies this software to be publicly redistributed on the * understanding that the author is not responsible for the correct * functioning of this software in any circumstances and is not liable for * any damages caused by this software. - * + * * October 1992 */ diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index c0e8823..60a6811 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_denode.c,v 1.10 1995/03/19 12:11:13 davidg Exp $ */ +/* $Id: msdosfs_denode.c,v 1.11 1995/04/11 17:13:17 bde Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.9 1994/08/21 18:44:00 ws Exp $ */ /*- @@ -34,17 +34,17 @@ */ /* * Written by Paul Popelka (paulp@uts.amdahl.com) - * + * * You can do anything you want with this software, just don't say you wrote * it, and don't remove this notice. - * + * * This software is provided "as is". - * + * * The author supplies this software to be publicly redistributed on the * understanding that the author is not responsible for the correct * functioning of this software in any circumstances and is not liable for * any damages caused by this software. - * + * * October 1992 */ @@ -83,7 +83,7 @@ msdosfs_hashget(dev, dirclust, diroff) u_long diroff; { struct denode *dep; - + for (;;) for (dep = dehashtbl[DEHASH(dev, dirclust + diroff)];; dep = dep->de_next) { @@ -111,7 +111,7 @@ msdosfs_hashins(dep) struct denode *dep; { struct denode **depp, *deq; - + depp = &dehashtbl[DEHASH(dep->de_dev, dep->de_dirclust + dep->de_diroffset)]; deq = *depp; if (deq) @@ -137,17 +137,17 @@ msdosfs_hashrem(dep) } /* - * If deget() succeeds it returns with the gotten denode locked(). + * If deget() succeeds it returns with the gotten denode locked(). * * pmp - address of msdosfsmount structure of the filesystem containing * the denode of interest. The pm_dev field and the address of - * the msdosfsmount structure are used. + * the msdosfsmount structure are used. * dirclust - which cluster bp contains, if dirclust is 0 (root directory) * diroffset is relative to the beginning of the root directory, - * otherwise it is cluster relative. - * diroffset - offset past begin of cluster of denode we want + * otherwise it is cluster relative. + * diroffset - offset past begin of cluster of denode we want * direntptr - address of the direntry structure of interest. If direntptr is - * NULL, the block is read if necessary. + * NULL, the block is read if necessary. * depp - returns the address of the gotten denode. */ int @@ -187,7 +187,7 @@ deget(pmp, dirclust, diroffset, direntptr, depp) * the directory entry to compute the hash value. For subdir use * address of "." entry. for root dir use cluster MSDOSFSROOT, * offset MSDOSFSROOT_OFS - * + * * NOTE: The check for de_refcnt > 0 below insures the denode being * examined does not represent an unlinked but still open file. * These files are not to be accessible even when the directory @@ -337,7 +337,7 @@ deupdat(dep, tp, waitfor) * update. */ error = readde(dep, &bp, &dirp); - if (error) + if (error) return error; /* @@ -535,7 +535,7 @@ deextend(dep, length, cred) u_long count; int error; struct timespec ts; - + /* * The root of a DOS filesystem cannot be extended. */ @@ -554,7 +554,7 @@ deextend(dep, length, cred) if (length <= dep->de_FileSize) panic("deextend: file too large"); - + /* * Compute the number of clusters to allocate. */ @@ -569,7 +569,7 @@ deextend(dep, length, cred) return error; } } - + dep->de_flag |= DE_UPDATE; dep->de_FileSize = length; TIMEVAL_TO_TIMESPEC(&time, &ts); @@ -606,7 +606,7 @@ msdosfs_reclaim(ap) { struct vnode *vp = ap->a_vp; struct denode *dep = VTODE(vp); - + #ifdef MSDOSFS_DEBUG printf("msdosfs_reclaim(): dep %p, file %s, refcnt %ld\n", dep, dep->de_Name, dep->de_refcnt); @@ -630,10 +630,10 @@ msdosfs_reclaim(ap) } dep->de_flag = 0; - + FREE(dep, M_MSDOSFSNODE); vp->v_data = NULL; - + return 0; } @@ -647,7 +647,7 @@ msdosfs_inactive(ap) struct denode *dep = VTODE(vp); int error = 0; struct timespec ts; - + #ifdef MSDOSFS_DEBUG printf("msdosfs_inactive(): dep %p, de_Name[0] %x\n", dep, dep->de_Name[0]); #endif diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c index 06b30e4..b43f959 100644 --- a/sys/fs/msdosfs/msdosfs_fat.c +++ b/sys/fs/msdosfs/msdosfs_fat.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_fat.c,v 1.5 1995/02/10 18:39:45 bde Exp $ */ +/* $Id: msdosfs_fat.c,v 1.6 1995/04/11 16:43:20 bde Exp $ */ /* $NetBSD: msdosfs_fat.c,v 1.12 1994/08/21 18:44:04 ws Exp $ */ /*- @@ -34,17 +34,17 @@ */ /* * Written by Paul Popelka (paulp@uts.amdahl.com) - * + * * You can do anything you want with this software, just don't say you wrote * it, and don't remove this notice. - * + * * This software is provided "as is". - * + * * The author supplies this software to be publicly redistributed on the * understanding that the author is not responsible for the correct * functioning of this software in any circumstances and is not liable for * any damages caused by this software. - * + * * October 1992 */ @@ -251,7 +251,7 @@ hiteof:; * Find the closest entry in the fat cache to the cluster we are looking * for. */ -void +void fc_lookup(dep, findcn, frcnp, fsrcnp) struct denode *dep; u_long findcn; @@ -344,22 +344,22 @@ updatefats(pmp, bp, fatbn) /* * Updating entries in 12 bit fats is a pain in the butt. - * + * * The following picture shows where nibbles go when moving from a 12 bit * cluster number into the appropriate bytes in the FAT. - * + * * byte m byte m+1 byte m+2 * +----+----+ +----+----+ +----+----+ * | 0 1 | | 2 3 | | 4 5 | FAT bytes * +----+----+ +----+----+ +----+----+ - * + * * +----+----+----+ +----+----+----+ * | 3 0 1 | | 4 5 2 | * +----+----+----+ +----+----+----+ * cluster n cluster n+1 - * + * * Where n is even. m = n + (n >> 2) - * + * */ static inline void usemap_alloc(pmp, cn) @@ -414,10 +414,10 @@ clusterfree(pmp, cluster, oldcnp) * cluster'th entry if this is a get function * newcontents - the new value to be written into the cluster'th element of * the fat if this is a set function. - * + * * This function can also be used to free a cluster by setting the fat entry * for a cluster to 0. - * + * * All copies of the fat are updated if this is a set function. NOTE: If * fatentry() marks a cluster as free it does not update the inusemap in * the msdosfsmount structure. This is left to the caller. @@ -470,7 +470,7 @@ fatentry(function, pmp, cn, oldcontents, newcontents) error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp); if (error) return error; - + if (function & FAT_GET) { readcn = getushort(&bp->b_data[bo]); if (FAT12(pmp)) { @@ -523,7 +523,7 @@ fatchain(pmp, start, count, fillwith) int error; u_long bn, bo, bsize, byteoffset, readcn, newc; struct buf *bp; - + #ifdef MSDOSFS_DEBUG printf("fatchain(pmp %p, start %ld, count %ld, fillwith %ld)\n", pmp, start, count, fillwith); @@ -533,7 +533,7 @@ fatchain(pmp, start, count, fillwith) */ if (start < CLUST_FIRST || start + count - 1 > pmp->pm_maxcluster) return EINVAL; - + while (count > 0) { byteoffset = FATOFS(pmp, start); fatblock(pmp, byteoffset, &bn, &bsize, &bo); @@ -585,7 +585,7 @@ chainlength(pmp, start, count) u_long idx, max_idx; u_int map; u_long len; - + max_idx = pmp->pm_maxcluster / N_INUSEBITS; idx = start / N_INUSEBITS; start %= N_INUSEBITS; @@ -632,7 +632,7 @@ chainalloc(pmp, start, count, fillwith, retcluster, got) u_long *got; { int error; - + error = fatchain(pmp, start, count, fillwith); if (error == 0) { #ifdef MSDOSFS_DEBUG @@ -672,7 +672,7 @@ clusteralloc(pmp, start, count, fillwith, retcluster, got) u_long idx; u_long len, newst, foundcn, foundl, cn, l; u_int map; - + #ifdef MSDOSFS_DEBUG printf("clusteralloc(): find %d clusters\n",count); #endif @@ -684,19 +684,19 @@ clusteralloc(pmp, start, count, fillwith, retcluster, got) * This is a new file, initialize start */ struct timeval tv; - + microtime(&tv); start = (tv.tv_usec >> 10)|tv.tv_usec; len = 0; } - + /* * Start at a (pseudo) random place to maximize cluster runs * under multiple writers. */ foundcn = newst = (start * 1103515245 + 12345) % (pmp->pm_maxcluster + 1); foundl = 0; - + for (cn = newst; cn <= pmp->pm_maxcluster;) { idx = cn / N_INUSEBITS; map = pmp->pm_inusemap[idx]; @@ -759,7 +759,7 @@ freeclusterchain(pmp, cluster) struct buf *bp = NULL; u_long bn, bo, bsize, byteoffset; u_long readcn, lbn = -1; - + while (cluster >= CLUST_FIRST && cluster <= pmp->pm_maxcluster) { byteoffset = FATOFS(pmp, cluster); fatblock(pmp, byteoffset, &bn, &bsize, &bo); @@ -878,7 +878,7 @@ extendfile(dep, count, bpp, ncp, flags) u_long cn, got; struct msdosfsmount *pmp = dep->de_pmp; struct buf *bp; - + /* * Don't try to extend the root directory */ @@ -901,7 +901,7 @@ extendfile(dep, count, bpp, ncp, flags) return error; error = 0; } - + while (count > 0) { /* * Allocate a new cluster chain and cat onto the end of the file. @@ -918,9 +918,9 @@ extendfile(dep, count, bpp, ncp, flags) error = clusteralloc(pmp, cn, count, CLUST_EOFE, &cn, &got); if (error) return error; - + count -= got; - + /* * Give them the filesystem relative cluster number if they want * it. @@ -929,7 +929,7 @@ extendfile(dep, count, bpp, ncp, flags) *ncp = cn; ncp = NULL; } - + if (dep->de_StartCluster == 0) { dep->de_StartCluster = cn; frcn = 0; @@ -940,16 +940,16 @@ extendfile(dep, count, bpp, ncp, flags) clusterfree(pmp, cn, NULL); return error; } - + frcn = dep->de_fc[FC_LASTFC].fc_frcn + 1; } - + /* * Update the "last cluster of the file" entry in the denode's fat * cache. */ fc_setcache(dep, FC_LASTFC, frcn + got - 1, cn + got - 1); - + if (flags & DE_CLEAR) { while (got-- > 0) { /* @@ -979,6 +979,6 @@ extendfile(dep, count, bpp, ncp, flags) } } } - + return 0; } diff --git a/sys/fs/msdosfs/msdosfs_lookup.c b/sys/fs/msdosfs/msdosfs_lookup.c index 5e9cbca..a80e5ae 100644 --- a/sys/fs/msdosfs/msdosfs_lookup.c +++ b/sys/fs/msdosfs/msdosfs_lookup.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_lookup.c,v 1.2 1994/09/27 20:42:51 phk Exp $ */ +/* $Id: msdosfs_lookup.c,v 1.3 1995/05/09 16:30:44 bde Exp $ */ /* $NetBSD: msdosfs_lookup.c,v 1.14 1994/08/21 18:44:07 ws Exp $ */ /*- @@ -34,17 +34,17 @@ */ /* * Written by Paul Popelka (paulp@uts.amdahl.com) - * + * * You can do anything you want with this software, just don't say you wrote * it, and don't remove this notice. - * + * * This software is provided "as is". - * + * * The author supplies this software to be publicly redistributed on the * understanding that the author is not responsible for the correct * functioning of this software in any circumstances and is not liable for * any damages caused by this software. - * + * * October 1992 */ diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 4a765b9..bbb4fc6 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vfsops.c,v 1.5 1994/10/02 17:48:21 phk Exp $ */ +/* $Id: msdosfs_vfsops.c,v 1.6 1994/12/12 12:35:47 bde Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.19 1994/08/21 18:44:10 ws Exp $ */ /*- @@ -34,17 +34,17 @@ */ /* * Written by Paul Popelka (paulp@uts.amdahl.com) - * + * * You can do anything you want with this software, just don't say you wrote * it, and don't remove this notice. - * + * * This software is provided "as is". - * + * * The author supplies this software to be publicly redistributed on the * understanding that the author is not responsible for the correct * functioning of this software in any circumstances and is not liable for * any damages caused by this software. - * + * * October 1992 */ @@ -70,9 +70,9 @@ int msdosfsdoforce = 1; /* 1 = force unmount */ /* - * mp - path - addr in user space of mount point (ie /usr or whatever) + * mp - path - addr in user space of mount point (ie /usr or whatever) * data - addr in user space of mount params including the name of the block - * special file to treat as a filesystem. + * special file to treat as a filesystem. */ int msdosfs_mount(mp, path, data, ndp, p) @@ -169,7 +169,7 @@ msdosfs_mount(mp, path, data, ndp, p) crfree(cred); /* XXX */ if (error != 0) return error; - + /* * Be sure they've given us a block device to treat as a * filesystem. And, that its major number is within the bdevsw diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 0993c9d..047eea0 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vnops.c,v 1.14 1995/04/11 18:32:17 ache Exp $ */ +/* $Id: msdosfs_vnops.c,v 1.15 1995/05/09 16:30:45 bde Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */ /*- @@ -34,17 +34,17 @@ */ /* * Written by Paul Popelka (paulp@uts.amdahl.com) - * + * * You can do anything you want with this software, just don't say you wrote * it, and don't remove this notice. - * + * * This software is provided "as is". - * + * * The author supplies this software to be publicly redistributed on the * understanding that the author is not responsible for the correct * functioning of this software in any circumstances and is not liable for * any damages caused by this software. - * + * * October 1992 */ @@ -73,7 +73,7 @@ #include <msdosfs/fat.h> /* * Some general notes: - * + * * In the ufs filesystem the inodes, superblocks, and indirect blocks are * read/written using the vnode for the filesystem. Blocks that represent * the contents of a file are read/written using the vnode for the file @@ -156,7 +156,7 @@ msdosfs_mknod(ap) } */ *ap; { int error; - + switch (ap->a_vap->va_type) { case VDIR: error = msdosfs_mkdir((struct vop_mkdir_args *)ap); @@ -222,13 +222,13 @@ vaccess(file_mode, uid, gid, acc_mode, cred) mode_t mask; int i; register gid_t *gp; - + /* User id 0 always gets access. */ if (cred->cr_uid == 0) return 0; - + mask = 0; - + /* Otherwise, check the owner. */ if (cred->cr_uid == uid) { if (acc_mode & VEXEC) @@ -239,7 +239,7 @@ vaccess(file_mode, uid, gid, acc_mode, cred) mask |= S_IWUSR; return (file_mode & mask) == mask ? 0 : EACCES; } - + /* Otherwise, check the groups. */ for (i = 0, gp = cred->cr_groups; i < cred->cr_ngroups; i++, gp++) if (gid == *gp) { @@ -251,7 +251,7 @@ vaccess(file_mode, uid, gid, acc_mode, cred) mask |= S_IWGRP; return (file_mode & mask) == mask ? 0 : EACCES; } - + /* Otherwise, check everyone else. */ if (acc_mode & VEXEC) mask |= S_IXOTH; @@ -274,11 +274,11 @@ msdosfs_access(ap) mode_t dosmode; struct denode *dep = VTODE(ap->a_vp); struct msdosfsmount *pmp = dep->de_pmp; - + dosmode = (S_IXUSR|S_IXGRP|S_IXOTH) | (S_IRUSR|S_IRGRP|S_IROTH) | ((dep->de_Attributes & ATTR_READONLY) ? 0 : (S_IWUSR|S_IWGRP|S_IWOTH)); dosmode &= pmp->pm_mask; - + return vaccess(dosmode, pmp->pm_uid, pmp->pm_gid, ap->a_mode, ap->a_cred); } @@ -352,7 +352,7 @@ msdosfs_setattr(ap) struct denode *dep = VTODE(ap->a_vp); struct vattr *vap = ap->a_vap; struct ucred *cred = ap->a_cred; - + #ifdef MSDOSFS_DEBUG printf("msdosfs_setattr(): vp %08x, vap %08x, cred %08x, p %08x\n", ap->a_vp, vap, cred, ap->a_p); @@ -396,7 +396,7 @@ msdosfs_setattr(ap) if (vap->va_mtime.ts_sec != VNOVAL) { if (cred->cr_uid != dep->de_pmp->pm_uid && (error = suser(cred, &ap->a_p->p_acflag)) && - ((vap->va_vaflags & VA_UTIMES_NULL) == 0 || + ((vap->va_vaflags & VA_UTIMES_NULL) == 0 || (error = VOP_ACCESS(ap->a_vp, VWRITE, cred, &ap->a_p)))) return error; dep->de_flag |= DE_UPDATE; @@ -574,7 +574,7 @@ msdosfs_write(ap) struct msdosfsmount *pmp = dep->de_pmp; struct ucred *cred = ap->a_cred; struct timespec ts; - + #ifdef MSDOSFS_DEBUG printf("msdosfs_write(vp %08x, uio %08x, ioflag %08x, cred %08x\n", vp, uio, ioflag, cred); @@ -658,7 +658,7 @@ msdosfs_write(ap) lastcn = dep->de_fc[FC_LASTFC].fc_frcn; } else lastcn = de_clcount(pmp, osize) - 1; - + do { bn = de_blk(pmp, uio->uio_offset); if (isadir) { @@ -669,7 +669,7 @@ msdosfs_write(ap) error = ENOSPC; break; } - + if ((uio->uio_offset & pmp->pm_crbomask) == 0 && (de_blk(pmp, uio->uio_offset + uio->uio_resid) > de_blk(pmp, uio->uio_offset) || uio->uio_offset + uio->uio_resid >= dep->de_FileSize)) { @@ -687,7 +687,7 @@ msdosfs_write(ap) if (!isadir) { if (bp->b_blkno == bp->b_lblkno) { error = pcbmap(dep, bp->b_lblkno, - &bp->b_blkno, 0); + &bp->b_blkno, 0); if (error) bp->b_blkno = -1; } @@ -802,7 +802,7 @@ msdosfs_mmap(ap) /* * Flush the blocks of a file to disk. - * + * * This function is worthless for vnodes that represent directories. Maybe we * could just do a sync if they try an fsync on a directory file. */ @@ -917,9 +917,9 @@ msdosfs_link(ap) * Renames on files require moving the denode to a new hash queue since the * denode's location is used to compute which hash queue to put the file * in. Unless it is a rename in place. For example "mv a b". - * + * * What follows is the basic algorithm: - * + * * if (file move) { * if (dest file exists) { * remove dest file @@ -951,13 +951,13 @@ msdosfs_link(ap) * clear old directory entry for moved directory * } * } - * + * * On entry: * source's parent directory is unlocked * source file or directory is unlocked * destination's parent directory is locked * destination file or directory is locked if it exists - * + * * On exit: * all denodes should be released * @@ -1646,7 +1646,7 @@ msdosfs_readdir(ap) ncookies++; } dentp++; - + crnt = (struct dirent *) ((char *) crnt + sizeof(struct direntry)); pushout = 1; @@ -1722,7 +1722,7 @@ out: ; *ap->a_eofflag = 1; else *ap->a_eofflag = 0; - + return error; } diff --git a/sys/fs/msdosfs/msdosfsmount.h b/sys/fs/msdosfs/msdosfsmount.h index 270b5b4..5309acb 100644 --- a/sys/fs/msdosfs/msdosfsmount.h +++ b/sys/fs/msdosfs/msdosfsmount.h @@ -1,4 +1,4 @@ -/* $Id: msdosfsmount.h,v 1.1 1994/09/19 15:41:48 dfr Exp $ */ +/* $Id: msdosfsmount.h,v 1.2 1994/09/27 20:42:59 phk Exp $ */ /* $NetBSD: msdosfsmount.h,v 1.7 1994/08/21 18:44:17 ws Exp $ */ /*- @@ -34,17 +34,17 @@ */ /* * Written by Paul Popelka (paulp@uts.amdahl.com) - * + * * You can do anything you want with this software, just don't say you wrote * it, and don't remove this notice. - * + * * This software is provided "as is". - * + * * The author supplies this software to be publicly redistributed on the * understanding that the author is not responsible for the correct * functioning of this software in any circumstances and is not liable for * any damages caused by this software. - * + * * October 1992 */ @@ -88,19 +88,19 @@ struct msdosfsmount { /* * How to compute pm_cnshift and pm_crbomask. - * - * pm_crbomask = (pm_SectPerClust * pm_BytesPerSect) - 1 - * if (bytesperclust == * 0) - * return EBADBLKSZ; - * bit = 1; - * for (i = 0; i < 32; i++) { - * if (bit & bytesperclust) { - * if (bit ^ bytesperclust) - * return EBADBLKSZ; - * pm_cnshift = * i; - * break; - * } - * bit <<= 1; + * + * pm_crbomask = (pm_SectPerClust * pm_BytesPerSect) - 1 + * if (bytesperclust == * 0) + * return EBADBLKSZ; + * bit = 1; + * for (i = 0; i < 32; i++) { + * if (bit & bytesperclust) { + * if (bit ^ bytesperclust) + * return EBADBLKSZ; + * pm_cnshift = * i; + * break; + * } + * bit <<= 1; * } */ |