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

efi: avoid reading global state for get_product_name() #686

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

HuijingHei
Copy link
Member

Inspired by #685 (comment)

Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

@@ -139,7 +141,8 @@ impl Efi {
log::debug!("Not booted via EFI, skipping firmware update");
return Ok(());
}
let product_name = get_product_name()?;
let sysroot = Dir::open_ambient_dir(&Path::new("/"), cap_std::ambient_authority())?;
Copy link
Member

Choose a reason for hiding this comment

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

Minor nit, you can just pass "/" here, because the API accepts impl AsRef<Path>.

@cgwalters cgwalters merged commit 293a71f into coreos:main Jul 17, 2024
12 checks passed
@HuijingHei HuijingHei deleted the minor-update branch August 1, 2024 14:46
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