msdosfs_vfsops.c (0ef0dd6f85c8cc7c8b6193449cd1544d4ab34a85) msdosfs_vfsops.c (0ff34b5e1ca270b47567b78c45ec375134e78620)
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).

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

393 pmp->pm_Heads = getushort(b50->bpbHeads);
394 pmp->pm_Media = b50->bpbMedia;
395
396 /* calculate the ratio of sector size to DEV_BSIZE */
397 pmp->pm_BlkPerSec = pmp->pm_BytesPerSec / DEV_BSIZE;
398
399 /* XXX - We should probably check more values here */
400 if (!pmp->pm_BytesPerSec || !SecPerClust
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).

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

393 pmp->pm_Heads = getushort(b50->bpbHeads);
394 pmp->pm_Media = b50->bpbMedia;
395
396 /* calculate the ratio of sector size to DEV_BSIZE */
397 pmp->pm_BlkPerSec = pmp->pm_BytesPerSec / DEV_BSIZE;
398
399 /* XXX - We should probably check more values here */
400 if (!pmp->pm_BytesPerSec || !SecPerClust
401 || !pmp->pm_Heads || pmp->pm_Heads > 255
401 || !pmp->pm_Heads
402#ifdef PC98
403 || !pmp->pm_SecPerTrack || pmp->pm_SecPerTrack > 255) {
404#else
405 || !pmp->pm_SecPerTrack || pmp->pm_SecPerTrack > 63) {
406#endif
407 error = EINVAL;
408 goto error_exit;
409 }

--- 495 unchanged lines hidden ---
402#ifdef PC98
403 || !pmp->pm_SecPerTrack || pmp->pm_SecPerTrack > 255) {
404#else
405 || !pmp->pm_SecPerTrack || pmp->pm_SecPerTrack > 63) {
406#endif
407 error = EINVAL;
408 goto error_exit;
409 }

--- 495 unchanged lines hidden ---