Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/msdosfs passs FAT block mask as argument to MSDOSFSEOF()...



details:   https://anonhg.NetBSD.org/src/rev/d3dfb05d510d
branches:  trunk
changeset: 486100:d3dfb05d510d
user:      cgd <cgd%NetBSD.org@localhost>
date:      Sat May 13 06:04:41 2000 +0000

description:
passs FAT block mask as argument to MSDOSFSEOF(), so that fat.h is
more useful.

diffstat:

 sys/msdosfs/fat.h            |  6 +++---
 sys/msdosfs/msdosfs_denode.c |  4 ++--
 sys/msdosfs/msdosfs_fat.c    |  4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diffs (56 lines):

diff -r 64d37a81c549 -r d3dfb05d510d sys/msdosfs/fat.h
--- a/sys/msdosfs/fat.h Sat May 13 05:31:00 2000 +0000
+++ b/sys/msdosfs/fat.h Sat May 13 06:04:41 2000 +0000
@@ -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
 /*
diff -r 64d37a81c549 -r d3dfb05d510d sys/msdosfs/msdosfs_denode.c
--- a/sys/msdosfs/msdosfs_denode.c      Sat May 13 05:31:00 2000 +0000
+++ b/sys/msdosfs/msdosfs_denode.c      Sat May 13 06:04:41 2000 +0000
@@ -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 @@
         * 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);
diff -r 64d37a81c549 -r d3dfb05d510d sys/msdosfs/msdosfs_fat.c
--- a/sys/msdosfs/msdosfs_fat.c Sat May 13 05:31:00 2000 +0000
+++ b/sys/msdosfs/msdosfs_fat.c Sat May 13 06:04:41 2000 +0000
@@ -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 @@
                cn &= pmp->pm_fatmask;
        }
 
-       if (!MSDOSFSEOF(pmp, cn)) {
+       if (!MSDOSFSEOF(cn, pmp->pm_fatmask)) {
                if (bp)
                        brelse(bp);
                if (bnp)



Home | Main Index | Thread Index | Old Index