summaryrefslogtreecommitdiffstats
path: root/sys/fs/msdosfs/msdosfs_fat.c
diff options
context:
space:
mode:
authortrhodes <trhodes@FreeBSD.org>2007-10-25 08:23:08 +0000
committertrhodes <trhodes@FreeBSD.org>2007-10-25 08:23:08 +0000
commit9d167f82e426b3c6481ebd3bcdba5afbae063a7d (patch)
treec51089d8c2600066bea1ed81ec0a5db3ae7ed506 /sys/fs/msdosfs/msdosfs_fat.c
parent94fbc001c8703dcde08373077f205386188204a9 (diff)
downloadFreeBSD-src-9d167f82e426b3c6481ebd3bcdba5afbae063a7d.zip
FreeBSD-src-9d167f82e426b3c6481ebd3bcdba5afbae063a7d.tar.gz
Remove some debugging code that, while useful, doesn't belong in the committed
version. While here, expand a macro only used once. Discussed with/oked by: bde
Diffstat (limited to 'sys/fs/msdosfs/msdosfs_fat.c')
-rw-r--r--sys/fs/msdosfs/msdosfs_fat.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c
index fa8741c..32da0e3e 100644
--- a/sys/fs/msdosfs/msdosfs_fat.c
+++ b/sys/fs/msdosfs/msdosfs_fat.c
@@ -72,8 +72,6 @@ static int fc_bmapcalls; /* # of times pcbmap was called */
static int fc_lmdistance[LMMAX];/* counters for how far off the last
* cluster mapped entry was. */
static int fc_largedistance; /* off by more than LMMAX */
-static int fc_wherefrom, fc_whereto, fc_lastclust;
-static int pm_fatblocksize;
static int chainalloc(struct msdosfsmount *pmp, u_long start,
u_long count, u_long fillwith, u_long *retcluster,
@@ -114,7 +112,6 @@ fatblock(pmp, ofs, bnp, sizep, bop)
*sizep = size;
if (bop)
*bop = ofs % pmp->pm_fatblocksize;
- pm_fatblocksize = pmp->pm_fatblocksize;
}
/*
@@ -206,12 +203,9 @@ pcbmap(dep, findcn, bnp, cnp, sp)
*/
i = 0;
fc_lookup(dep, findcn, &i, &cn);
- if ((bn = findcn - i) >= LMMAX) {
+ if ((bn = findcn - i) >= LMMAX)
fc_largedistance++;
- fc_wherefrom = i;
- fc_whereto = findcn;
- fc_lastclust = dep->de_fc[FC_LASTFC].fc_frcn;
- } else
+ else
fc_lmdistance[bn]++;
/*
@@ -1007,7 +1001,10 @@ extendfile(dep, count, bpp, ncp, flags)
return (error);
}
- fc_last_to_nexttolast(dep);
+ dep->de_fc[FC_NEXTTOLASTFC].fc_frcn =
+ dep->de_fc[FC_LASTFC].fc_frcn;
+ dep->de_fc[FC_NEXTTOLASTFC].fc_fsrcn =
+ dep->de_fc[FC_LASTFC].fc_fsrcn;
while (count > 0) {
/*
* Allocate a new cluster chain and cat onto the end of the
OpenPOWER on IntegriCloud