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

MfciPkg: Correct Mfci script for switchover to using edk2toollib Variable service #598

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading