msdosfs_vfsops.c (9bf1a756976b17430a9a0c6f58052edb24d1cf9d) msdosfs_vfsops.c (abe78e97084030a6d5956a041482af989f2695fe)
1/* $FreeBSD$ */
2/* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */
3
4/*-
5 * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
6 * Copyright (C) 1994, 1995, 1997 TooLs GmbH.
7 * All rights reserved.
8 * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below).

--- 529 unchanged lines hidden (view full) ---

538 pmp->pm_nxtfree = getulong(fp->fsinxtfree);
539 else
540 pmp->pm_fsinfo = 0;
541 brelse(bp);
542 bp = NULL;
543 }
544
545 /*
1/* $FreeBSD$ */
2/* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */
3
4/*-
5 * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
6 * Copyright (C) 1994, 1995, 1997 TooLs GmbH.
7 * All rights reserved.
8 * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below).

--- 529 unchanged lines hidden (view full) ---

538 pmp->pm_nxtfree = getulong(fp->fsinxtfree);
539 else
540 pmp->pm_fsinfo = 0;
541 brelse(bp);
542 bp = NULL;
543 }
544
545 /*
546 * Check and validate (or perhaps invalidate?) the fsinfo structure? XXX
546 * Check and validate (or perhaps invalidate?) the fsinfo structure?
547 */
547 */
548 if (pmp->pm_fsinfo && pmp->pm_nxtfree > pmp->pm_maxcluster) {
549 printf("Next free cluster in FSInfo (%u) exceeds maxcluster (%u)\n",
550 pmp->pm_nxtfree, pmp->pm_maxcluster);
551 error = EINVAL;
552 goto error_exit;
553 }
548
549 /*
550 * Allocate memory for the bitmap of allocated clusters, and then
551 * fill it in.
552 */
553 pmp->pm_inusemap = malloc(((pmp->pm_maxcluster + N_INUSEBITS - 1)
554 / N_INUSEBITS)
555 * sizeof(*pmp->pm_inusemap),

--- 281 unchanged lines hidden ---
554
555 /*
556 * Allocate memory for the bitmap of allocated clusters, and then
557 * fill it in.
558 */
559 pmp->pm_inusemap = malloc(((pmp->pm_maxcluster + N_INUSEBITS - 1)
560 / N_INUSEBITS)
561 * sizeof(*pmp->pm_inusemap),

--- 281 unchanged lines hidden ---