Page MenuHomeFreeBSD

nanobsd: Get the code size by its partition index
ClosedPublic

Authored by jlduran on May 24 2026, 10:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jul 5, 1:39 PM
Unknown Object (File)
Sat, Jul 4, 10:41 PM
Unknown Object (File)
Fri, Jun 12, 11:53 PM
Unknown Object (File)
Fri, Jun 12, 11:07 PM
Unknown Object (File)
Fri, Jun 12, 10:45 PM
Unknown Object (File)
Jun 4 2026, 7:21 AM
Unknown Object (File)
Jun 2 2026, 8:45 PM
Unknown Object (File)
Jun 2 2026, 8:32 AM
Subscribers

Details

Summary

Previously the code was assumed to be on the on the first line of the
_.partitioning file. Instead, explicitly look up the size by its
partition index to make the parsing order-independent.

The _.partitioning file:

  1. First column: starting sector.
  2. Second column: size in 512-byte sectors.
  3. Third column: partition index.

Get the code size by explicitly selecting when the partition index is 1.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable