Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Mark EFI status codes as must_use and check them #21

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

Merged
GabrielMajeri merged 1 commit into rust-osdev:master from HadrienG2:check-statuses
Sep 21, 2018
Merged

Mark EFI status codes as must_use and check them #21

GabrielMajeri merged 1 commit into rust-osdev:master from HadrienG2:check-statuses
Sep 21, 2018

Conversation

Copy link
Contributor

@HadrienG2 HadrienG2 commented Sep 21, 2018

Since forgetting to check status codes is a common mistake in APIs that use them, I think that marking the UEFI status codes as must_use is a good idea.

I added assertions in the two places where they were not checked (reasonably, as there is only one valid reply in the current spec), which should act as a protection against buggy firmwares or future revisions of the spec adding new status codes.

GabrielMajeri reacted with thumbs up emoji
@GabrielMajeri GabrielMajeri merged commit 0551959 into rust-osdev:master Sep 21, 2018
@HadrienG2 HadrienG2 deleted the check-statuses branch September 21, 2018 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /