mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04: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:
parent
70d8932f66
commit
043ec583dc
1 changed files with 7 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue