Skip to content

Commit

Permalink
MfciPkg: Correct Mfci script for switchover to using edk2toollib Vari…
Browse files Browse the repository at this point in the history
…able service (#598)

## Description

When switching over to using edk2toollib's UefiVariable, SetVariable was
not updated to only expect a single return value.

- [ ] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested
Tested on a system verifying the python error no longer occurs.

## Integration Instructions
N/A
  • Loading branch information
apop5 committed Oct 16, 2024
1 parent 5beccf1 commit 734bf36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MfciPkg/Application/MfciPolicy/MfciPolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ def get_current_mfci_policy():
def delete_current_mfci_policy():
UefiVar = UefiVariable()

(errorcode, data) = UefiVar.SetUefiVar(CURRENT_POLICY_BLOB, MFCI_VENDOR_GUID, None, 3)
errorcode = UefiVar.SetUefiVar(CURRENT_POLICY_BLOB, MFCI_VENDOR_GUID, None, 3)
if errorcode == 0:
logging.info(f"Failed to Delete {CURRENT_POLICY_BLOB}\n {errorcode}")
print(f"Failed to delete {CURRENT_POLICY_BLOB}")
else:
logging.info(f"{CURRENT_POLICY_BLOB} was deleted")
print(f"{CURRENT_POLICY_BLOB} was deleted")

(errorcode, data) = UefiVar.SetUefiVar(NEXT_MFCI_POLICY_BLOB, MFCI_VENDOR_GUID, None, 3)
errorcode = UefiVar.SetUefiVar(NEXT_MFCI_POLICY_BLOB, MFCI_VENDOR_GUID, None, 3)
if errorcode == 0:
logging.info(f"Failed to Delete {NEXT_MFCI_POLICY_BLOB}\n {errorcode}")
print(f"Failed to delete {NEXT_MFCI_POLICY_BLOB}")
Expand All @@ -128,7 +128,7 @@ def set_next_mfci_policy(policy):
var = file.read()
UefiVar = UefiVariable()

(errorcode, data) = UefiVar.SetUefiVar(NEXT_MFCI_POLICY_BLOB, MFCI_VENDOR_GUID, var, 3)
errorcode = UefiVar.SetUefiVar(NEXT_MFCI_POLICY_BLOB, MFCI_VENDOR_GUID, var, 3)
if errorcode == 0:
logging.info("Next Policy failed: {errorcode}")
else:
Expand Down

0 comments on commit 734bf36

Please sign in to comment.