passs FAT block mask as argument to MSDOSFSEOF(), so that fat.h is
more useful.
This commit is contained in:
parent
d4091aa02e
commit
db4b935691
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fat.h,v 1.15 2000/03/27 17:40:26 jdolecek Exp $ */
|
||||
/* $NetBSD: fat.h,v 1.16 2000/05/13 06:04:41 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1994, 1997 Wolfgang Solfrank.
|
||||
@ -87,8 +87,8 @@
|
||||
* of course).
|
||||
* Note that cn is supposed to be already adjusted accordingly to FAT type.
|
||||
*/
|
||||
#define MSDOSFSEOF(pmp, cn) \
|
||||
(((cn) & CLUST_EOFS) == (CLUST_EOFS & (pmp)->pm_fatmask))
|
||||
#define MSDOSFSEOF(cn, fatmask) \
|
||||
(((cn) & CLUST_EOFS) == (CLUST_EOFS & (fatmask)))
|
||||
|
||||
#ifdef _KERNEL
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msdosfs_denode.c,v 1.41 2000/03/27 17:40:26 jdolecek Exp $ */
|
||||
/* $NetBSD: msdosfs_denode.c,v 1.42 2000/05/13 06:04:41 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
|
||||
@ -476,7 +476,7 @@ detrunc(dep, length, flags, cred, p)
|
||||
* Now free the clusters removed from the file because of the
|
||||
* truncation.
|
||||
*/
|
||||
if (chaintofree != 0 && !MSDOSFSEOF(pmp, chaintofree))
|
||||
if (chaintofree != 0 && !MSDOSFSEOF(chaintofree, pmp->pm_fatmask))
|
||||
freeclusterchain(pmp, chaintofree);
|
||||
|
||||
return (allerror);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msdosfs_fat.c,v 1.32 2000/03/27 17:40:26 jdolecek Exp $ */
|
||||
/* $NetBSD: msdosfs_fat.c,v 1.33 2000/05/13 06:04:42 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
|
||||
@ -240,7 +240,7 @@ pcbmap(dep, findcn, bnp, cnp, sp)
|
||||
cn &= pmp->pm_fatmask;
|
||||
}
|
||||
|
||||
if (!MSDOSFSEOF(pmp, cn)) {
|
||||
if (!MSDOSFSEOF(cn, pmp->pm_fatmask)) {
|
||||
if (bp)
|
||||
brelse(bp);
|
||||
if (bnp)
|
||||
|
Loading…
Reference in New Issue
Block a user