Page MenuHomeFreeBSD

loader: always set media size from partition.
ClosedPublic

Authored by tsoome on Nov 3 2018, 12:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 10:14 AM
Unknown Object (File)
Sat, Apr 6, 6:40 AM
Unknown Object (File)
Sat, Apr 6, 6:40 AM
Unknown Object (File)
Sat, Apr 6, 5:27 AM
Unknown Object (File)
Sat, Apr 6, 12:49 AM
Unknown Object (File)
Jan 16 2024, 12:50 AM
Unknown Object (File)
Dec 20 2023, 1:13 AM
Unknown Object (File)
Dec 14 2023, 7:21 AM

Details

Summary

The disk access is validated by using partition table definitions, therefore
we have no need for if statements, just set the disk size.

Of course the partition table itself may be incorrect/inconsistent, but if
so, we are in trouble anyhow.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Seems legit to me. I like the abstraction even if we don't determine the size in multiple places.

juan.molina_club.fr added inline comments.
stand/i386/libi386/biosdisk.c
445 ↗(On Diff #49967)

Typo: mulitplication

tsoome added inline comments.
stand/i386/libi386/biosdisk.c
445 ↗(On Diff #49967)

Yes, thanks:)

tsoome marked an inline comment as done.

Typo fixed.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 7 2018, 11:14 AM
This revision was automatically updated to reflect the committed changes.