Skip to content
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

Better console checks #416

Merged
merged 2 commits into from
Oct 12, 2021
Merged

Better console checks #416

merged 2 commits into from
Oct 12, 2021

Conversation

vathpela
Copy link
Contributor

There's a potential for future (or even existing) platforms to without console output to not populate ST->ConIn and ST->ConOut. This patch set adds checks to all of our usage of those protocol shortcuts.

There's been some discussion on how to handle machines without console
devices.  The consensus so far has been that they should have dummy
ConOut implementations, but that means the first vendor to build a
machine without asking around is in for some surprises.

This patch makes the places where our console library uses ST->ConIn or
ST->ConOut check that they're present before doing so.

Signed-off-by: Peter Jones <pjones@redhat.com>
Several places in e.g. MokManager and our console library use
ST->ConOut->ClearScreen directly, without checking for the existence of
a console output device.

This patch adds function to our console library to do that correctly,
instead of using the bug-prone ad hoc implementation everywhere.

Signed-off-by: Peter Jones <pjones@redhat.com>
Copy link
Member

@frozencemetery frozencemetery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine as an improvement.

@vathpela vathpela merged commit 35ca373 into rhboot:main Oct 12, 2021
@vathpela vathpela deleted the better-console-checks branch October 12, 2021 14:40
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.

2 participants