X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FCommon%2FVariableAttributes.py;h=522adac8d558562c29860f332a6328a1ba94debb;hp=a2e22ca0409c230dc6f29a1aa3c7bdfa5a83e19f;hb=f7496d717357b9af78414d19679b073403812340;hpb=39456d00f36e04b7e7efb208f350f4e83b6c3531 diff --git a/BaseTools/Source/Python/Common/VariableAttributes.py b/BaseTools/Source/Python/Common/VariableAttributes.py index a2e22ca040..522adac8d5 100644 --- a/BaseTools/Source/Python/Common/VariableAttributes.py +++ b/BaseTools/Source/Python/Common/VariableAttributes.py @@ -1,9 +1,9 @@ # # @file -# +# # This file is used to handle the variable attributes and property information # # -# Copyright (c) 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -12,7 +12,7 @@ # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # - + class VariableAttributes(object): EFI_VARIABLE_NON_VOLATILE = 0x00000001 EFI_VARIABLE_BOOTSERVICE_ACCESS = 0x00000002 @@ -24,22 +24,22 @@ class VariableAttributes(object): "RT":EFI_VARIABLE_RUNTIME_ACCESS, "RO":VAR_CHECK_VARIABLE_PROPERTY_READ_ONLY } - + def __init__(self): pass - + @staticmethod def GetVarAttributes(var_attr_str): VarAttr = 0x00000000 VarProp = 0x00000000 - + attr_list = var_attr_str.split(",") for attr in attr_list: attr = attr.strip() if attr == 'RO': VarProp = VariableAttributes.VAR_CHECK_VARIABLE_PROPERTY_READ_ONLY else: - VarAttr = VarAttr | VariableAttributes.VarAttributesMap.get(attr, 0x00000000) + VarAttr = VarAttr | VariableAttributes.VarAttributesMap.get(attr, 0x00000000) return VarAttr, VarProp @staticmethod def ValidateVarAttributes(var_attr_str):