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)
Thu, Jul 16, 10:20 AM
Unknown Object (File)
Wed, Jul 15, 7:23 AM
Unknown Object (File)
Wed, Jul 15, 7:23 AM
Unknown Object (File)
Sun, Jul 5, 1:39 PM
Unknown Object (File)
Sat, Jul 4, 10:41 PM
Unknown Object (File)
Jun 12 2026, 11:53 PM
Unknown Object (File)
Jun 12 2026, 11:07 PM
Unknown Object (File)
Jun 12 2026, 10:45 PM
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