public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: Fix bugs use special character in the --pcd option
@ 2018-10-15 12:46 Yonghong Zhu
  2018-10-15 17:43 ` Carsey, Jaben
  0 siblings, 1 reply; 2+ messages in thread
From: Yonghong Zhu @ 2018-10-15 12:46 UTC (permalink / raw)
  To: edk2-devel

Cases:
--pcd Token.Name="!"
--pcd Token.Name="\'W&\'"
--pcd Token.Name="2*h"

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/Source/Python/Workspace/DscBuildData.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index aaef404..1a0a293 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -1078,10 +1078,12 @@ class DscBuildData(PlatformBuildClassObject):
             if PcdValue.upper() == 'TRUE':
                 PcdValue = str(1)
             if not FieldName:
                 if PcdDatumType not in TAB_PCD_NUMERIC_TYPES:
                     PcdValue = '"' + PcdValue + '"'
+                elif not PcdValue.isdigit() and not PcdValue.upper().startswith('0X'):
+                    PcdValue = '"' + PcdValue + '"'
             else:
                 IsArray = False
                 Base = 10
                 if PcdValue.upper().startswith('0X'):
                     Base = 16
-- 
2.6.1.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch] BaseTools: Fix bugs use special character in the --pcd option
  2018-10-15 12:46 [Patch] BaseTools: Fix bugs use special character in the --pcd option Yonghong Zhu
@ 2018-10-15 17:43 ` Carsey, Jaben
  0 siblings, 0 replies; 2+ messages in thread
From: Carsey, Jaben @ 2018-10-15 17:43 UTC (permalink / raw)
  To: Zhu, Yonghong, edk2-devel@lists.01.org

Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Yonghong Zhu
> Sent: Monday, October 15, 2018 5:46 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [Patch] BaseTools: Fix bugs use special character in the --pcd
> option
> 
> Cases:
> --pcd Token.Name="!"
> --pcd Token.Name="\'W&\'"
> --pcd Token.Name="2*h"
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
> ---
>  BaseTools/Source/Python/Workspace/DscBuildData.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py
> b/BaseTools/Source/Python/Workspace/DscBuildData.py
> index aaef404..1a0a293 100644
> --- a/BaseTools/Source/Python/Workspace/DscBuildData.py
> +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
> @@ -1078,10 +1078,12 @@ class DscBuildData(PlatformBuildClassObject):
>              if PcdValue.upper() == 'TRUE':
>                  PcdValue = str(1)
>              if not FieldName:
>                  if PcdDatumType not in TAB_PCD_NUMERIC_TYPES:
>                      PcdValue = '"' + PcdValue + '"'
> +                elif not PcdValue.isdigit() and not PcdValue.upper().startswith('0X'):
> +                    PcdValue = '"' + PcdValue + '"'
>              else:
>                  IsArray = False
>                  Base = 10
>                  if PcdValue.upper().startswith('0X'):
>                      Base = 16
> --
> 2.6.1.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-15 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-15 12:46 [Patch] BaseTools: Fix bugs use special character in the --pcd option Yonghong Zhu
2018-10-15 17:43 ` Carsey, Jaben

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox