Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/msdosfs relax sanity check. It's ok to have more FAT ...



details:   https://anonhg.NetBSD.org/src/rev/6fceee7a60f7
branches:  trunk
changeset: 828086:6fceee7a60f7
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Mon Nov 27 15:02:05 2017 +0000

description:
relax sanity check. It's ok to have more FAT sectors than needed.

diffstat:

 sys/fs/msdosfs/msdosfs_vfsops.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r c3dfba3bc569 -r 6fceee7a60f7 sys/fs/msdosfs/msdosfs_vfsops.c
--- a/sys/fs/msdosfs/msdosfs_vfsops.c   Mon Nov 27 12:25:02 2017 +0000
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c   Mon Nov 27 15:02:05 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msdosfs_vfsops.c,v 1.128 2017/08/20 11:48:15 mlelstv Exp $     */
+/*     $NetBSD: msdosfs_vfsops.c,v 1.129 2017/11/27 15:02:05 mlelstv Exp $     */
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.128 2017/08/20 11:48:15 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.129 2017/11/27 15:02:05 mlelstv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -724,8 +724,8 @@
        fatbytes = (pmp->pm_maxcluster+1) * pmp->pm_fatmult / pmp->pm_fatdiv;
        fatblocksecs = howmany(fatbytes, pmp->pm_BytesPerSec);
 
-       if (pmp->pm_FATsecs != fatblocksecs) {
-               DPRINTF("FATsecs %lu != real %lu\n", pmp->pm_FATsecs,
+       if (pmp->pm_FATsecs < fatblocksecs) {
+               DPRINTF("FATsecs %lu < real %lu\n", pmp->pm_FATsecs,
                        fatblocksecs);
                error = EINVAL;
                goto error_exit;



Home | Main Index | Thread Index | Old Index