Skip to content

Fix CHS and partition size fields in mbr example - #312

Merged
keichi merged 1 commit into
masterfrom
fix-mbr-example
Oct 15, 2026
Merged

keichi merged 1 commit into
masterfrom
fix-mbr-example

Conversation

@keichi

@keichi keichi commented Oct 15, 2026

Copy link
Copy Markdown
Owner
  • The start CHS address dropped the high two cylinder bits instead of merging them into cylinder like the end CHS address does. Use the same formatter for both.
  • The last field of a partition entry is the number of sectors, not the end LBA (e.g. 8192 + 85045 < 94208, the start of the next partition). Rename endLBA to sectorCount.

Merge the high cylinder bits into the start CHS address as well as the
end one, and rename endLBA to sectorCount since the field holds the
number of sectors in the partition.
@keichi
keichi merged commit c688013 into master Oct 15, 2026
8 checks passed
@keichi
keichi deleted the fix-mbr-example branch October 15, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant