public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Feng, Bob C" <bob.c.feng@intel.com>
To: "Carsey, Jaben" <jaben.carsey@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Gao, Liming" <liming.gao@intel.com>
Subject: Re: [Patch V2 5/5] BaseTools/GenFds/Capsule: move function logic
Date: Fri, 18 Jan 2019 00:18:01 +0000	[thread overview]
Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D16005DBDC@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <abd9c3e4d654add506cc3787df13ee50503eeeba.1547511539.git.jaben.carsey@intel.com>

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Carsey, Jaben 
Sent: Thursday, January 17, 2019 11:35 PM
To: edk2-devel@lists.01.org
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [Patch V2 5/5] 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>
---
 BaseTools/Source/Python/Common/Misc.py    | 6 ------
 BaseTools/Source/Python/GenFds/Capsule.py | 4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index 5968a3de4e1f..a1bfc502477c 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -1906,12 +1906,6 @@ class SkuClass():
         else:
             return 'DEFAULT'
 
-#
-# Pack a registry format GUID
-#
-def PackRegistryFormatGuid(Guid):
-    return PackGUID(Guid.split('-'))
-
 ##  Get the integer value from string like "14U" or integer like 2  #
 #   @param      Input   The object that may be either a integer value or a string
diff --git a/BaseTools/Source/Python/GenFds/Capsule.py b/BaseTools/Source/Python/GenFds/Capsule.py
index df29c40dbd20..1cdbdcf7ba86 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)))
--
2.16.2.windows.1



      reply	other threads:[~2019-01-18  0:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 15:35 [Patch V2 0/5] cleanup shared functions Jaben Carsey
2019-01-17 15:35 ` [Patch V2 1/5] BaseTools/build/build: refactor and move functions Jaben Carsey
2019-01-18  0:17   ` Feng, Bob C
2019-01-17 15:35 ` [Patch V2 2/5] BaseTools/Workspace/InfBuildData: " Jaben Carsey
2019-01-18  0:17   ` Feng, Bob C
2019-01-17 15:35 ` [Patch V2 3/5] BaseTools/DscBuildData: move function Jaben Carsey
2019-01-18  0:17   ` Feng, Bob C
2019-01-17 15:35 ` [Patch V2 4/5] BaseTools/AutoGen: move functions Jaben Carsey
2019-01-18  0:17   ` Feng, Bob C
2019-01-17 15:35 ` [Patch V2 5/5] BaseTools/GenFds/Capsule: move function logic Jaben Carsey
2019-01-18  0:18   ` Feng, Bob C [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=08650203BA1BD64D8AD9B6D5D74A85D16005DBDC@SHSMSX101.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox