diff options
-rw-r--r-- | sys/msdosfs/bootsect.h | 10 | ||||
-rw-r--r-- | sys/msdosfs/bpb.h | 10 | ||||
-rw-r--r-- | sys/msdosfs/denode.h | 10 | ||||
-rw-r--r-- | sys/msdosfs/direntry.h | 10 | ||||
-rw-r--r-- | sys/msdosfs/fat.h | 10 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_conv.c | 46 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_denode.c | 38 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_fat.c | 56 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_lookup.c | 38 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_vfsops.c | 28 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_vnops.c | 12 | ||||
-rw-r--r-- | sys/msdosfs/msdosfsmount.h | 10 |
12 files changed, 139 insertions, 139 deletions
diff --git a/sys/msdosfs/bootsect.h b/sys/msdosfs/bootsect.h index 56cde30376d..f009b356407 100644 --- a/sys/msdosfs/bootsect.h +++ b/sys/msdosfs/bootsect.h @@ -1,19 +1,19 @@ -/* $OpenBSD: bootsect.h,v 1.5 2006/12/15 03:04:24 krw Exp $ */ +/* $OpenBSD: bootsect.h,v 1.6 2015/10/23 10:45:31 krw Exp $ */ /* $NetBSD: bootsect.h,v 1.8 1997/10/17 11:23:29 ws 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/msdosfs/bpb.h b/sys/msdosfs/bpb.h index c1550ec2585..af480309eed 100644 --- a/sys/msdosfs/bpb.h +++ b/sys/msdosfs/bpb.h @@ -1,19 +1,19 @@ -/* $OpenBSD: bpb.h,v 1.6 2014/12/19 22:44:59 guenther Exp $ */ +/* $OpenBSD: bpb.h,v 1.7 2015/10/23 10:45:31 krw Exp $ */ /* $NetBSD: bpb.h,v 1.6 1997/10/17 11:23:35 ws 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/msdosfs/denode.h b/sys/msdosfs/denode.h index 7be8d0513b3..2aecc8c3ff0 100644 --- a/sys/msdosfs/denode.h +++ b/sys/msdosfs/denode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: denode.h,v 1.26 2013/06/11 16:42:16 deraadt Exp $ */ +/* $OpenBSD: denode.h,v 1.27 2015/10/23 10:45:31 krw Exp $ */ /* $NetBSD: denode.h,v 1.24 1997/10/17 11:23:39 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/msdosfs/direntry.h b/sys/msdosfs/direntry.h index 7ceff2472b5..33f524b5646 100644 --- a/sys/msdosfs/direntry.h +++ b/sys/msdosfs/direntry.h @@ -1,4 +1,4 @@ -/* $OpenBSD: direntry.h,v 1.6 2002/03/14 01:27:09 millert Exp $ */ +/* $OpenBSD: direntry.h,v 1.7 2015/10/23 10:45:31 krw Exp $ */ /* $NetBSD: direntry.h,v 1.13 1997/10/17 11:23:45 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/msdosfs/fat.h b/sys/msdosfs/fat.h index 3b698c83f20..1fd12af89d9 100644 --- a/sys/msdosfs/fat.h +++ b/sys/msdosfs/fat.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fat.h,v 1.10 2013/06/11 16:42:16 deraadt Exp $ */ +/* $OpenBSD: fat.h,v 1.11 2015/10/23 10:45:31 krw Exp $ */ /* $NetBSD: fat.h,v 1.11 1997/10/17 11:23: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/msdosfs/msdosfs_conv.c b/sys/msdosfs/msdosfs_conv.c index 0504d6fa031..80eec767891 100644 --- a/sys/msdosfs/msdosfs_conv.c +++ b/sys/msdosfs/msdosfs_conv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_conv.c,v 1.18 2014/12/16 18:30:04 tedu Exp $ */ +/* $OpenBSD: msdosfs_conv.c,v 1.19 2015/10/23 10:45:31 krw Exp $ */ /* $NetBSD: msdosfs_conv.c,v 1.24 1997/10/17 11:23: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 */ @@ -372,7 +372,7 @@ dos2unixfn(u_char dn[11], u_char *un, int lower) c = dos2unix[*dn]; *un++ = lower ? u2l[c] : c; dn++; - + /* * Copy the name portion into the unix filename string. */ @@ -382,7 +382,7 @@ dos2unixfn(u_char dn[11], u_char *un, int lower) thislong++; } dn += 8 - i; - + /* * Now, if there is an extension then put in a period and copy in * the extension. @@ -419,14 +419,14 @@ unix2dosfn(u_char *un, u_char dn[11], int unlen, u_int gen) int conv = 1; u_char *cp, *dp, *dp1; u_char gentext[6]; - + /* * Fill the dos filename string with blanks. These are DOS's pad * characters. */ for (i = 0; i < 11; i++) dn[i] = ' '; - + /* * The filenames "." and ".." are handled specially, since they * don't follow dos filename rules. @@ -449,7 +449,7 @@ unix2dosfn(u_char *un, u_char dn[11], int unlen, u_int gen) break; if (i < 0) return 0; - + /* * Now find the extension * Note: dot as first char doesn't start extension @@ -471,7 +471,7 @@ unix2dosfn(u_char *un, u_char dn[11], int unlen, u_int gen) break; } } - + /* * Now convert it */ @@ -517,14 +517,14 @@ unix2dosfn(u_char *un, u_char dn[11], int unlen, u_int gen) */ if (!j) dn[0] = '_'; - + /* * The first character cannot be E5, * because that means a deleted entry */ if (dn[0] == 0xe5) dn[0] = SLOT_E5; - + /* * If there wasn't any char dropped, * there is no place for generation numbers @@ -534,7 +534,7 @@ unix2dosfn(u_char *un, u_char dn[11], int unlen, u_int gen) return 0; return conv; } - + /* * Now insert the generation number into the filename part */ @@ -569,7 +569,7 @@ unix2winfn(u_char *un, int unlen, struct winentry *wep, int cnt, int chksum) un += (cnt - 1) * WIN_CHARS; unlen -= (cnt - 1) * WIN_CHARS; - + /* * Initialize winentry to some useful default */ @@ -579,7 +579,7 @@ unix2winfn(u_char *un, int unlen, struct winentry *wep, int cnt, int chksum) wep->weReserved1 = 0; wep->weChksum = chksum; wep->weReserved2 = 0; - + /* * Now convert the filename parts */ @@ -621,7 +621,7 @@ winChkName(u_char *un, int unlen, struct winentry *wep, int chksum) { u_int8_t *cp; int i; - + /* * First compare checksums */ @@ -631,7 +631,7 @@ winChkName(u_char *un, int unlen, struct winentry *wep, int chksum) chksum = -1; if (chksum == -1) return -1; - + /* * Offset of this entry */ @@ -642,7 +642,7 @@ winChkName(u_char *un, int unlen, struct winentry *wep, int chksum) if ((wep->weCnt&WIN_LAST) && unlen > WIN_CHARS) return -1; - + /* * Compare the name parts */ @@ -690,7 +690,7 @@ win2unixfn(struct winentry *wep, struct dirent *dp, int chksum) if ((wep->weCnt&WIN_CNT) > howmany(WIN_MAXLEN, WIN_CHARS) || !(wep->weCnt&WIN_CNT)) return -1; - + /* * First compare checksums */ @@ -704,13 +704,13 @@ win2unixfn(struct winentry *wep, struct dirent *dp, int chksum) chksum = -1; if (chksum == -1) return -1; - + /* * Offset of this entry */ i = ((wep->weCnt&WIN_CNT) - 1) * WIN_CHARS; np = (u_int8_t *)dp->d_name + i; - + /* * Convert the name parts */ @@ -788,7 +788,7 @@ winChksum(u_int8_t *name) { int i; u_int8_t s; - + for (s = 0, i = 11; --i >= 0; s += *name++) s = (s << 7)|(s >> 1); return s; diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c index 8e8d8143e8c..b5d141cb845 100644 --- a/sys/msdosfs/msdosfs_denode.c +++ b/sys/msdosfs/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_denode.c,v 1.53 2015/01/09 05:01:57 tedu Exp $ */ +/* $OpenBSD: msdosfs_denode.c,v 1.54 2015/10/23 10:45:31 krw Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.23 1997/10/17 11:23:58 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 */ @@ -105,7 +105,7 @@ msdosfs_hashget(dev_t dev, uint32_t dirclust, uint32_t diroff) { struct denode *dep; struct proc *p = curproc; /* XXX */ - + for (;;) for (dep = dehashtbl[DEHASH(dev, dirclust, diroff)]; ; dep = dep->de_next) { @@ -132,7 +132,7 @@ msdosfs_hashins(struct denode *dep) depp = &dehashtbl[DEHASH(dep->de_dev, dep->de_dirclust, dep->de_diroffset)]; - + for (deq = *depp; deq; deq = deq->de_next) { if (dep->de_dirclust == deq->de_dirclust && dep->de_diroffset == deq->de_diroffset && @@ -168,15 +168,15 @@ msdosfs_hashrem(struct denode *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 * depp - returns the address of the gotten denode. */ int @@ -208,7 +208,7 @@ deget(struct msdosfsmount *pmp, uint32_t dirclust, uint32_t diroffset, * the directory entry to compute the hash value. For subdir use * address of "." entry. For root dir (if not FAT32) 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 @@ -254,7 +254,7 @@ retry: if (error) { vput (nvp); - + if (error == EEXIST) goto retry; @@ -521,7 +521,7 @@ deextend(struct denode *dep, uint32_t length, struct ucred *cred) struct msdosfsmount *pmp = dep->de_pmp; uint32_t count; int error; - + /* * The root of a DOS filesystem cannot be extended. */ @@ -536,7 +536,7 @@ deextend(struct denode *dep, uint32_t length, struct ucred *cred) if (length <= dep->de_FileSize) panic("deextend: file too large"); - + /* * Compute the number of clusters to allocate. */ @@ -551,7 +551,7 @@ deextend(struct denode *dep, uint32_t length, struct ucred *cred) return (error); } } - + dep->de_FileSize = length; dep->de_flag |= DE_UPDATE|DE_MODIFIED; return (deupdat(dep, 1)); @@ -590,7 +590,7 @@ msdosfs_reclaim(void *v) if (prtactive && vp->v_usecount != 0) vprint("msdosfs_reclaim(): pushing active", vp); #endif - + #ifdef MSDOSFS_DEBUG printf("msdosfs_reclaim(): dep %08x, file %.11s, refcnt %d\n", dep, dep->de_Name, dep->de_refcnt); @@ -630,7 +630,7 @@ msdosfs_inactive(void *v) if (prtactive && vp->v_usecount != 0) vprint("msdosfs_inactive(): pushing active", vp); #endif - + #ifdef MSDOSFS_DEBUG printf("msdosfs_inactive(): dep %08x, de_Name[0] %x\n", dep, dep->de_Name[0]); @@ -641,7 +641,7 @@ msdosfs_inactive(void *v) /* * Get rid of denodes related to stale file handles. */ - if (dep->de_Name[0] == SLOT_DELETED) + if (dep->de_Name[0] == SLOT_DELETED) goto out; /* diff --git a/sys/msdosfs/msdosfs_fat.c b/sys/msdosfs/msdosfs_fat.c index c1eee86631e..0da897d5b66 100644 --- a/sys/msdosfs/msdosfs_fat.c +++ b/sys/msdosfs/msdosfs_fat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_fat.c,v 1.26 2014/12/16 18:30:04 tedu Exp $ */ +/* $OpenBSD: msdosfs_fat.c,v 1.27 2015/10/23 10:45:31 krw Exp $ */ /* $NetBSD: msdosfs_fat.c,v 1.26 1997/10/17 11:24:02 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 */ @@ -387,22 +387,22 @@ updatefats(struct msdosfsmount *pmp, struct buf *bp, uint32_t 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 - * + * cluster n cluster n+1 + * * Where n is even. m = n + (n >> 2) - * + * */ static __inline void usemap_alloc(struct msdosfsmount *pmp, uint32_t cn) @@ -453,10 +453,10 @@ clusterfree(struct msdosfsmount *pmp, uint32_t cluster, uint32_t *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. @@ -506,7 +506,7 @@ fatentry(int function, struct msdosfsmount *pmp, uint32_t cn, uint32_t *oldconte brelse(bp); return (error); } - + if (function & FAT_GET) { if (FAT32(pmp)) readcn = getulong(&bp->b_data[bo]); @@ -570,7 +570,7 @@ fatchain(struct msdosfsmount *pmp, uint32_t start, uint32_t count, uint32_t fill int error; uint32_t bn, bo, bsize, byteoffset, readcn, newc; struct buf *bp; - + #ifdef MSDOSFS_DEBUG printf("fatchain(pmp %08x, start %d, count %d, fillwith %d)\n", pmp, start, count, fillwith); @@ -580,7 +580,7 @@ fatchain(struct msdosfsmount *pmp, uint32_t start, uint32_t count, uint32_t fill */ 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); @@ -641,7 +641,7 @@ chainlength(struct msdosfsmount *pmp, uint32_t start, uint32_t count) uint32_t idx, max_idx; u_int map; uint32_t len; - + max_idx = pmp->pm_maxcluster / N_INUSEBITS; idx = start / N_INUSEBITS; start %= N_INUSEBITS; @@ -718,7 +718,7 @@ clusteralloc(struct msdosfsmount *pmp, uint32_t start, uint32_t count, uint32_t len, newst, foundl, cn, l; uint32_t foundcn = 0; /* XXX: foundcn could be used uninitialized */ u_int map; - + #ifdef MSDOSFS_DEBUG printf("clusteralloc(): find %d clusters\n",count); #endif @@ -730,19 +730,19 @@ clusteralloc(struct msdosfsmount *pmp, uint32_t start, uint32_t count, * 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. */ 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]; @@ -929,7 +929,7 @@ extendfile(struct denode *dep, uint32_t count, struct buf **bpp, uint32_t *ncp, uint32_t cn, got; struct msdosfsmount *pmp = dep->de_pmp; struct buf *bp; - + /* * Don't try to extend the root directory */ @@ -977,9 +977,9 @@ extendfile(struct denode *dep, uint32_t count, struct buf **bpp, uint32_t *ncp, 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. @@ -988,7 +988,7 @@ extendfile(struct denode *dep, uint32_t count, struct buf **bpp, uint32_t *ncp, *ncp = cn; ncp = NULL; } - + if (dep->de_StartCluster == 0) { dep->de_StartCluster = cn; frcn = 0; @@ -1002,13 +1002,13 @@ extendfile(struct denode *dep, uint32_t count, struct buf **bpp, uint32_t *ncp, } 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) { /* @@ -1039,6 +1039,6 @@ extendfile(struct denode *dep, uint32_t count, struct buf **bpp, uint32_t *ncp, } } } - + return (0); } diff --git a/sys/msdosfs/msdosfs_lookup.c b/sys/msdosfs/msdosfs_lookup.c index 1dcc4f80ae4..131530be1c3 100644 --- a/sys/msdosfs/msdosfs_lookup.c +++ b/sys/msdosfs/msdosfs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_lookup.c,v 1.27 2014/12/16 18:30:04 tedu Exp $ */ +/* $OpenBSD: msdosfs_lookup.c,v 1.28 2015/10/23 10:45:31 krw Exp $ */ /* $NetBSD: msdosfs_lookup.c,v 1.34 1997/10/18 22:12:27 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 */ @@ -192,7 +192,7 @@ msdosfs_lookup(void *v) if ((nameiop == CREATE || nameiop == RENAME) && (flags & ISLASTCN)) slotcount = 0; - + #ifdef MSDOSFS_DEBUG printf("msdosfs_lookup(): dos version of filename '%.11s', length %d\n", dosfilename, cnp->cn_namelen); @@ -257,7 +257,7 @@ msdosfs_lookup(void *v) * Drop memory of previous long matches */ chksum = -1; - + if (slotcount < wincnt) { slotcount++; slotoffset = diroff; @@ -273,7 +273,7 @@ msdosfs_lookup(void *v) */ if (slotcount < wincnt) slotcount = 0; - + /* * Check for Win95 long filename entry */ @@ -287,7 +287,7 @@ msdosfs_lookup(void *v) chksum); continue; } - + /* * Ignore volume labels (anywhere, not just * the root directory). @@ -357,7 +357,7 @@ notfound:; } if (wincnt > slotcount) slotoffset += sizeof(struct direntry) * (wincnt - slotcount); - + /* * If we get here we didn't find the entry we were looking for. But * that's ok if we are creating or renaming and are at the end of @@ -447,7 +447,7 @@ found:; * in a deadlock. */ brelse(bp); - + foundroot:; /* * If we entered at foundroot, then we are looking for the . or .. @@ -604,7 +604,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, struct buf *bp; daddr_t bn; int blsize; - + #ifdef MSDOSFS_DEBUG printf("createde(dep %08x, ddep %08x, depp %08x, cnp %08x)\n", dep, ddep, depp, cnp); @@ -632,7 +632,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, */ ddep->de_FileSize += de_cn2off(pmp, dirclust); } - + /* * We just read in the cluster with space. Copy the new directory * entry in. Then write it to disk. NOTE: DOS directories @@ -650,7 +650,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, return error; } ndep = bptoep(pmp, bp, ddep->de_fndoffset); - + DE_EXTERNALIZE(ndep, dep); /* @@ -661,7 +661,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, u_char *un = (u_char *)cnp->cn_nameptr; int unlen = cnp->cn_namelen; int cnt = 1; - + while (--ddep->de_fndcnt >= 0) { if (!(ddep->de_fndoffset & pmp->pm_crbomask)) { if ((error = bwrite(bp)) != 0) @@ -689,7 +689,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, break; } } - + if ((error = bwrite(bp)) != 0) return error; @@ -708,7 +708,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, } return deget(pmp, dirclust, diroffset, depp); } - + return 0; } @@ -936,7 +936,7 @@ removede(struct denode *pdep, struct denode *dep) int blsize; struct msdosfsmount *pmp = pdep->de_pmp; uint32_t offset = pdep->de_fndoffset; - + #ifdef MSDOSFS_DEBUG printf("removede(): filename %.11s, dep %08x, offset %08x\n", dep->de_Name, dep, offset); @@ -1009,7 +1009,7 @@ uniqdosname(struct denode *dep, struct componentname *cnp, u_char *cp) */ if (!unix2dosfn((u_char *)cnp->cn_nameptr, cp, cnp->cn_namelen, gen)) return gen == 1 ? EINVAL : EEXIST; - + /* * Now look for a dir entry with this exact name */ diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c index 5007797173c..9da6261e045 100644 --- a/sys/msdosfs/msdosfs_vfsops.c +++ b/sys/msdosfs/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vfsops.c,v 1.71 2015/02/13 13:35:03 millert Exp $ */ +/* $OpenBSD: msdosfs_vfsops.c,v 1.72 2015/10/23 10:45:31 krw Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs 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 */ @@ -91,9 +91,9 @@ int msdosfs_mountfs(struct vnode *, struct mount *, struct proc *, int msdosfs_sync_vnode(struct vnode *, void *); /* - * 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(struct mount *mp, const char *path, void *data, @@ -166,7 +166,7 @@ msdosfs_mount(struct mount *mp, const char *path, void *data, /* * Process export requests. */ - return (vfs_export(mp, &pmp->pm_export, + return (vfs_export(mp, &pmp->pm_export, &args.export_info)); } } @@ -234,7 +234,7 @@ msdosfs_mount(struct mount *mp, const char *path, void *data, else if (!(pmp->pm_flags & (MSDOSFSMNT_SHORTNAME | MSDOSFSMNT_LONGNAME))) { struct vnode *rvp; - + /* * Try to divine whether to support Win'95 long filenames */ @@ -347,7 +347,7 @@ msdosfs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p, /* Determine the number of DEV_BSIZE blocks in a MSDOSFS sector */ pmp->pm_BlkPerSec = pmp->pm_BytesPerSec / DEV_BSIZE; - if (!pmp->pm_BytesPerSec || !SecPerClust || pmp->pm_SecPerTrack > 64) { + if (!pmp->pm_BytesPerSec || !SecPerClust || pmp->pm_SecPerTrack > 64) { error = EFTYPE; goto error_exit; } @@ -382,7 +382,7 @@ msdosfs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p, * MSDOSFS sectors per cluster: >0 && power of 2 * MSDOSFS sector size: >= DEV_BSIZE && power of 2 * HUGE sector count: >0 - * FAT sectors: >0 + * FAT sectors: >0 */ if ((SecPerClust == 0) || (SecPerClust & (SecPerClust - 1)) || (pmp->pm_BytesPerSec < DEV_BSIZE) || @@ -391,8 +391,8 @@ msdosfs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p, (SecPerClust * pmp->pm_BlkPerSec > MAXBSIZE / DEV_BSIZE)) { error = EINVAL; goto error_exit; - } - + } + pmp->pm_HugeSectors *= pmp->pm_BlkPerSec; pmp->pm_HiddenSects *= pmp->pm_BlkPerSec; pmp->pm_FATsecs *= pmp->pm_BlkPerSec; @@ -694,7 +694,7 @@ msdosfs_sync_vnode(struct vnode *vp, void *arg) struct denode *dep; dep = VTODE(vp); - if (vp->v_type == VNON || + if (vp->v_type == VNON || ((dep->de_flag & (DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0 && LIST_EMPTY(&vp->v_dirtyblkhd)) || msa->waitfor == MNT_LAZY) { diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index 86e086cc973..7a93c80b51c 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vnops.c,v 1.101 2015/09/23 15:37:26 tedu Exp $ */ +/* $OpenBSD: msdosfs_vnops.c,v 1.102 2015/10/23 10:45:31 krw Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */ /*- @@ -333,7 +333,7 @@ msdosfs_getattr(void *v) vap->va_gen = 0; vap->va_blocksize = dep->de_pmp->pm_bpcluster; vap->va_bytes = (dep->de_FileSize + dep->de_pmp->pm_crbomask) & - ~(dep->de_pmp->pm_crbomask); + ~(dep->de_pmp->pm_crbomask); vap->va_type = ap->a_vp->v_type; return (0); } @@ -980,7 +980,7 @@ abortit: vrele(fvp); return (error); } - + /* * If source and dest are the same, do nothing. */ @@ -1253,11 +1253,11 @@ struct { CASE_LOWER_BASE | CASE_LOWER_EXT, /* lower case */ 0, /* create time 100ths */ { 0, 0 }, { 0, 0 }, /* create time & date */ - { 0, 0 }, /* access 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 */ @@ -1803,7 +1803,7 @@ msdosfs_strategy(void *v) clrbuf(bp); } if (bp->b_blkno == -1) { - s = splbio(); + s = splbio(); biodone(bp); splx(s); return (error); diff --git a/sys/msdosfs/msdosfsmount.h b/sys/msdosfs/msdosfsmount.h index 8a3a5f40adc..5c1b67c3fc4 100644 --- a/sys/msdosfs/msdosfsmount.h +++ b/sys/msdosfs/msdosfsmount.h @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfsmount.h,v 1.19 2009/01/05 01:14:40 krw Exp $ */ +/* $OpenBSD: msdosfsmount.h,v 1.20 2015/10/23 10:45:31 krw Exp $ */ /* $NetBSD: msdosfsmount.h,v 1.16 1997/10/17 11:24:24 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 */ |