-
-
Notifications
You must be signed in to change notification settings - Fork 771
kernel: move tbf code to its own library #2358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Looks like git tracked the moved files correctly.
Nice to remove another nightly feature from the kernel crate (now people can't use it elsewhere in the kernel).
Turns out it is not actually needed. Co-authored-by: Hudson Ayers <[email protected]>
I added some structure to the tbf library crate. I moved the types into their own file, and all of the parsing code into its own file. This makes it much more straightforward to add code to create tbfs in the future. |
bors r+ |
Pull Request Overview
As part of the effort to remove
unsafe
from the TBF parsing code (#1465), the last goal was always to move all of the TBF parsing code to its own library since by definition the kernel is not the only thing that needs to handle TBFs. Rather than have TBF code re-implemented, this would allow there to be a single TBF parsing crate that can be used by the kernel and also tools like elf2tab.Turns out, moving this to a library is quite easy. I didn't want to do this earlier in case there were fixes or updates needed to the earlier tbf parsing re-write from #1465. But since the code has been working now seems like a reasonable time to move it to a library.
Apologies to @alistair23 for moving code, but I can help update if git doesn't do it automatically.
Testing Strategy
This pull request was tested by running kernels on nano33 and hail, but really this doesn't change any logic.
TODO or Help Wanted
n/a
Documentation Updated
/docs
, or no updates are required.Formatting
make prepush
.