diff options
author | Carsey, Jaben <jaben.carsey@intel.com> | 2019-01-17 23:35:07 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-01-21 18:03:33 +0800 |
commit | 5c5ca9f1fbf876a6ff68887b1508063e1d4fb60c (patch) | |
tree | e36a265c3337767f074ec930266e30f4489a60ef /BaseTools/Source/Python/GenFds/Capsule.py | |
parent | 1bcc2cd63da6b540ff9f19ac6bb0cb4cf7d20e00 (diff) | |
download | edk2-5c5ca9f1fbf876a6ff68887b1508063e1d4fb60c.tar.gz |
BaseTools/GenFds/Capsule: move function logic
Move PackRegistryFormatGuid logic from Common.Misc to this file.
There were no other consumers of the function.
As it is one line, just replace the logic without the separate function.
v2 - change to fix the import statement
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/Capsule.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/Capsule.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/GenFds/Capsule.py b/BaseTools/Source/Python/GenFds/Capsule.py index df29c40dbd..1cdbdcf7ba 100644 --- a/BaseTools/Source/Python/GenFds/Capsule.py +++ b/BaseTools/Source/Python/GenFds/Capsule.py @@ -20,7 +20,7 @@ from .GenFdsGlobalVariable import GenFdsGlobalVariable, FindExtendTool from CommonDataClass.FdfClass import CapsuleClassObject
import Common.LongFilePathOs as os
from io import BytesIO
-from Common.Misc import SaveFileOnChange, PackRegistryFormatGuid
+from Common.Misc import SaveFileOnChange, PackGUID
import uuid
from struct import pack
from Common import EdkLogger
@@ -66,7 +66,7 @@ class Capsule (CapsuleClassObject): #
# Use FMP capsule GUID: 6DCBD5ED-E82D-4C44-BDA1-7194199AD92A
#
- Header.write(PackRegistryFormatGuid('6DCBD5ED-E82D-4C44-BDA1-7194199AD92A'))
+ Header.write(PackGUID('6DCBD5ED-E82D-4C44-BDA1-7194199AD92A'.split('-')))
HdrSize = 0
if 'CAPSULE_HEADER_SIZE' in self.TokensDict:
Header.write(pack('=I', int(self.TokensDict['CAPSULE_HEADER_SIZE'], 16)))
|