multiboot2-header crate - initial release - #95
Merged
Conversation
phip1611
force-pushed
the
multiboot2-header-crate
branch
from
October 2, 2021 13:39
f0ad633 to
f89b1de
Compare
phip1611
force-pushed
the
multiboot2-header-crate
branch
from
October 2, 2021 13:43
f89b1de to
1e3d39b
Compare
13 tasks
IsaacWoods
approved these changes
Oct 7, 2021
IsaacWoods
left a comment
Member
There was a problem hiding this comment.
I'm afraid I won't have time to do a review of this crate at the moment, as I'm very busy what with uni starting up again in the UK atm. I've had a brief flick through at the examples and code, however, and this seems very reasonable. Feel free to merge when you're happy with it!
phip1611
force-pushed
the
multiboot2-header-crate
branch
from
October 8, 2021 07:12
54c09cb to
78de7b3
Compare
phip1611
commented
Oct 8, 2021
|
|
||
| pub(crate) fn read_u8(&mut self) -> u8 { | ||
| self.off += 1; | ||
| unsafe { core::ptr::read(self.ptr.add(self.off - 1)) } |
Member
Author
There was a problem hiding this comment.
oops, this was committed by accident. But this shouldn't change everything, because dereferencing a u8 or reading it, result both in a copy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After I prepared everything, the
multiboot2-headercrate is ready for the initial release. I've put a lot of work into it and I am confident that the code base is solid. There are some tests and I also used external tools to compare the results, for example howbootinfoparses the mb2 header.Any additional comments @IsaacWoods ?
Small example/demo:
produces
The generated header can also be validated by crates such as
bootinfo.