mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 13:50:16 +00:00
fix(variables): set bool should have variable class parameter
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use crate::integrations::shim::hook::SecurityHook;
|
||||
use crate::utils;
|
||||
use crate::utils::ResolvedPath;
|
||||
use crate::utils::variables::VariableController;
|
||||
use crate::utils::variables::{VariableClass, VariableController};
|
||||
use anyhow::{Context, Result, anyhow, bail};
|
||||
use log::warn;
|
||||
use std::ffi::c_void;
|
||||
@@ -282,7 +282,11 @@ impl ShimSupport {
|
||||
/// for the full lifetime of boot services.
|
||||
pub fn retain() -> Result<()> {
|
||||
Self::SHIM_LOCK_VARIABLES
|
||||
.set_bool("ShimRetainProtocol", true)
|
||||
.set_bool(
|
||||
"ShimRetainProtocol",
|
||||
true,
|
||||
VariableClass::BootAndRuntimeTemporary,
|
||||
)
|
||||
.context("unable to retain shim protocol")?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ impl VariableController {
|
||||
|
||||
/// Set a boolean variable specified by `key` to `value`, converting the value.
|
||||
/// The variable `class` controls the attributes for the variable.
|
||||
pub fn set_bool(&self, key: &str, value: bool) -> Result<()> {
|
||||
self.set(key, &[value as u8], VariableClass::BootAndRuntimeTemporary)
|
||||
pub fn set_bool(&self, key: &str, value: bool, class: VariableClass) -> Result<()> {
|
||||
self.set(key, &[value as u8], class)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user