Don't check the bpbSecPerTrack and bpbHeads fields of the BPB.

They are typically 0 on new ia64 systems. Since we don't use
either field, there's no harm in not checking.
This commit is contained in:
marcel 2008-02-21 03:19:46 +00:00
parent ad24b435ad
commit c8e1e08fd3

View File

@ -508,14 +508,13 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp, struct thread *td)
/* calculate the ratio of sector size to DEV_BSIZE */
pmp->pm_BlkPerSec = pmp->pm_BytesPerSec / DEV_BSIZE;
/* XXX - We should probably check more values here */
if (!pmp->pm_BytesPerSec || !SecPerClust
|| !pmp->pm_Heads
#ifdef PC98
|| !pmp->pm_SecPerTrack || pmp->pm_SecPerTrack > 255) {
#else
|| !pmp->pm_SecPerTrack || pmp->pm_SecPerTrack > 63) {
#endif
/*
* We don't check pm_Heads nor pm_SecPerTrack, because
* these may not be set for EFI file systems. We don't
* use these anyway, so we're unaffected if they are
* invalid.
*/
if (!pmp->pm_BytesPerSec || !SecPerClust) {
error = EINVAL;
goto error_exit;
}