From 2deec9c0188618a3d77b2d6429d3f81d4aceb099 Mon Sep 17 00:00:00 2001 From: jdolecek Date: Mon, 3 Apr 2000 18:12:12 +0000 Subject: [PATCH] add a comment regarding FATMIRROR bit usage and restructure the code slighly to make the check more explicit --- sys/msdosfs/msdosfs_vfsops.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c index af1fa5155824..92b58ccc139d 100644 --- a/sys/msdosfs/msdosfs_vfsops.c +++ b/sys/msdosfs/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: msdosfs_vfsops.c,v 1.68 2000/03/30 02:27:35 simonb Exp $ */ +/* $NetBSD: msdosfs_vfsops.c,v 1.69 2000/04/03 18:12:12 jdolecek Exp $ */ /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. @@ -503,10 +503,12 @@ msdosfs_mountfs(devvp, mp, p, argp) pmp->pm_fatmult = 4; pmp->pm_fatdiv = 1; pmp->pm_FATsecs = getulong(b710->bpbBigFATsecs); - if (getushort(b710->bpbExtFlags) & FATMIRROR) - pmp->pm_curfat = getushort(b710->bpbExtFlags) & FATNUM; - else + + /* mirrorring is enabled if the FATMIRROR bit is not set */ + if ((getushort(b710->bpbExtFlags) & FATMIRROR) == 0) pmp->pm_flags |= MSDOSFS_FATMIRROR; + else + pmp->pm_curfat = getushort(b710->bpbExtFlags) & FATNUM; } else pmp->pm_flags |= MSDOSFS_FATMIRROR;