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)
Mon, Sep 7, 8:06 AM
Unknown Object (File)
Sun, Sep 6, 3:49 AM
Unknown Object (File)
Sat, Sep 5, 8:54 PM
Unknown Object (File)
Sat, Sep 5, 8:03 PM
Unknown Object (File)
Sat, Sep 5, 8:03 PM
Unknown Object (File)
Sat, Sep 5, 2:41 PM
Unknown Object (File)
Sat, Sep 5, 1:24 PM
Unknown Object (File)
Sat, Sep 5, 10:52 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