Skip to content

Commit 7a7fcc7

Browse files
committed
fix(variables): set bool should have variable class parameter
1 parent 812036f commit 7a7fcc7

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/integrations/shim.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::integrations::shim::hook::SecurityHook;
22
use crate::utils;
33
use crate::utils::ResolvedPath;
4-
use crate::utils::variables::VariableController;
4+
use crate::utils::variables::{VariableClass, VariableController};
55
use anyhow::{Context, Result, anyhow, bail};
66
use log::warn;
77
use std::ffi::c_void;
@@ -282,7 +282,11 @@ impl ShimSupport {
282282
/// for the full lifetime of boot services.
283283
pub fn retain() -> Result<()> {
284284
Self::SHIM_LOCK_VARIABLES
285-
.set_bool("ShimRetainProtocol", true)
285+
.set_bool(
286+
"ShimRetainProtocol",
287+
true,
288+
VariableClass::BootAndRuntimeTemporary,
289+
)
286290
.context("unable to retain shim protocol")?;
287291
Ok(())
288292
}

src/utils/variables.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl VariableController {
9595

9696
/// Set a boolean variable specified by `key` to `value`, converting the value.
9797
/// The variable `class` controls the attributes for the variable.
98-
pub fn set_bool(&self, key: &str, value: bool) -> Result<()> {
99-
self.set(key, &[value as u8], VariableClass::BootAndRuntimeTemporary)
98+
pub fn set_bool(&self, key: &str, value: bool, class: VariableClass) -> Result<()> {
99+
self.set(key, &[value as u8], class)
100100
}
101101
}

0 commit comments

Comments
 (0)