Deleted Added
full compact
msdosfs_vfsops.c (109623) msdosfs_vfsops.c (111119)
1/* $FreeBSD: head/sys/fs/msdosfs/msdosfs_vfsops.c 109623 2003-01-21 08:56:16Z alfred $ */
1/* $FreeBSD: head/sys/fs/msdosfs/msdosfs_vfsops.c 111119 2003-02-19 05:47:46Z imp $ */
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).
9 *

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

344#ifndef MSDOSFS_NOCHECKSIG
345 if (bsp->bs50.bsBootSectSig0 != BOOTSIG0
346 || bsp->bs50.bsBootSectSig1 != BOOTSIG1) {
347 error = EINVAL;
348 goto error_exit;
349 }
350#endif
351
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).
9 *

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

344#ifndef MSDOSFS_NOCHECKSIG
345 if (bsp->bs50.bsBootSectSig0 != BOOTSIG0
346 || bsp->bs50.bsBootSectSig1 != BOOTSIG1) {
347 error = EINVAL;
348 goto error_exit;
349 }
350#endif
351
352 pmp = malloc(sizeof *pmp, M_MSDOSFSMNT, M_ZERO);
352 pmp = malloc(sizeof *pmp, M_MSDOSFSMNT, M_WAITOK | M_ZERO);
353 pmp->pm_mountp = mp;
354
355 /*
356 * Compute several useful quantities from the bpb in the
357 * bootsector. Copy in the dos 5 variant of the bpb then fix up
358 * the fields that are different between dos 5 and dos 3.3.
359 */
360 SecPerClust = b50->bpbSecPerClust;

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

555
556 /*
557 * Allocate memory for the bitmap of allocated clusters, and then
558 * fill it in.
559 */
560 pmp->pm_inusemap = malloc(((pmp->pm_maxcluster + N_INUSEBITS - 1)
561 / N_INUSEBITS)
562 * sizeof(*pmp->pm_inusemap),
353 pmp->pm_mountp = mp;
354
355 /*
356 * Compute several useful quantities from the bpb in the
357 * bootsector. Copy in the dos 5 variant of the bpb then fix up
358 * the fields that are different between dos 5 and dos 3.3.
359 */
360 SecPerClust = b50->bpbSecPerClust;

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

555
556 /*
557 * Allocate memory for the bitmap of allocated clusters, and then
558 * fill it in.
559 */
560 pmp->pm_inusemap = malloc(((pmp->pm_maxcluster + N_INUSEBITS - 1)
561 / N_INUSEBITS)
562 * sizeof(*pmp->pm_inusemap),
563 M_MSDOSFSFAT, 0);
563 M_MSDOSFSFAT, M_WAITOK);
564
565 /*
566 * fillinusemap() needs pm_devvp.
567 */
568 pmp->pm_dev = dev;
569 pmp->pm_devvp = devvp;
570
571 /*

--- 274 unchanged lines hidden ---
564
565 /*
566 * fillinusemap() needs pm_devvp.
567 */
568 pmp->pm_dev = dev;
569 pmp->pm_devvp = devvp;
570
571 /*

--- 274 unchanged lines hidden ---