Source-Changes-HG archive

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

[src/trunk]: src/sys/msdosfs Fix definition of MSDOSFSEOF(), which got broken...



details:   https://anonhg.NetBSD.org/src/rev/374cea44f4bd
branches:  trunk
changeset: 483985:374cea44f4bd
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Mar 22 14:33:25 2000 +0000

description:
Fix definition of MSDOSFSEOF(), which got broken in rev. 1.13.
It's shape is a bit different now than it was in rev 1.12, but is functionally
equivalent. Also add a comment explaining it's sense.

This fixes breakage reported after LP64 fixes in kern/8037, and
also kern/9116 and kern/9206.

Rewieved by: Wolfgang Solfrank, Chris G. Demetriou

diffstat:

 sys/msdosfs/fat.h |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r 3f46bd2c498f -r 374cea44f4bd sys/msdosfs/fat.h
--- a/sys/msdosfs/fat.h Wed Mar 22 11:34:15 2000 +0000
+++ b/sys/msdosfs/fat.h Wed Mar 22 14:33:25 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fat.h,v 1.13 1999/07/27 05:38:02 cgd Exp $     */
+/*     $NetBSD: fat.h,v 1.14 2000/03/22 14:33:25 jdolecek Exp $        */
 
 /*-
  * Copyright (C) 1994, 1997 Wolfgang Solfrank.
@@ -80,7 +80,14 @@
 #define        FAT16(pmp)      (pmp->pm_fatmask == FAT16_MASK)
 #define        FAT32(pmp)      (pmp->pm_fatmask == FAT32_MASK)
 
-#define        MSDOSFSEOF(pmp, cn)     ((cn) == (CLUST_EOFS & (pmp)->pm_fatmask))
+/*
+ * M$ in it's unlimited wisdom desided that EOF mark is anything
+ * between 0xfffffff8 and 0xffffffff (masked by appropriate fatmask,
+ * 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))
 
 #ifdef _KERNEL
 /*



Home | Main Index | Thread Index | Old Index