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)
Wed, Aug 12, 6:56 PM
Unknown Object (File)
Wed, Aug 12, 11:20 AM
Unknown Object (File)
Tue, Aug 11, 11:24 PM
Unknown Object (File)
Tue, Aug 11, 11:18 PM
Unknown Object (File)
Mon, Aug 10, 10:21 AM
Unknown Object (File)
Mon, Aug 10, 8:24 AM
Unknown Object (File)
Sun, Aug 9, 1:46 PM
Unknown Object (File)
Sun, Aug 9, 4:38 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