Skip to content

Conversation

kernelpoetlaureate
Copy link

The readsb() function directly copies the on-disk superblock into the
in-memory struct. This is safe because the mkfs tool writes the filesystem
image in little-endian format, and the RISC-V kernel also runs on a
little-endian architecture.

Add a comment to make this implicit design assumption explicit. This
clarifies for students why direct memory copying works here and highlights a
key consideration for system portability.

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