1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

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 Moolenaar 2008-02-21 03:19:46 +00:00
parent 70d8932f66
commit 043ec583dc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176431

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;
}