public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "Thomaiyar, Richard Marian" <richard.marian.thomaiyar@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH] IntelFsp2Pkg: Raise exception for invalid BSF option
Date: Thu, 16 Mar 2017 14:06:13 +0000	[thread overview]
Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A905ED9@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20170315092423.13840-1-richard.marian.thomaiyar@intel.com>

Reviewed-by: jiewen.yao@Intel.com

> -----Original Message-----
> From: Thomaiyar, Richard Marian
> Sent: Wednesday, March 15, 2017 5:24 PM
> To: edk2-devel@lists.01.org
> Cc: Ma, Maurice <maurice.ma@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>;
> Thomaiyar, Richard Marian <richard.marian.thomaiyar@intel.com>
> Subject: [PATCH] IntelFsp2Pkg: Raise exception for invalid BSF option
> 
> Raise exception for invalid BSF option in GenCfgOpt.py
> 
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
> ---
>  IntelFsp2Pkg/Tools/GenCfgOpt.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> b/IntelFsp2Pkg/Tools/GenCfgOpt.py
> index d8038e9..6dc1b10 100644
> --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
> @@ -1,6 +1,6 @@
>  ## @ GenCfgOpt.py
>  #
> -# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
>  # This program and the accompanying materials are licensed and made available
> under
>  # the terms and conditions of the BSD License that accompanies this
> distribution.
>  # The full text of the license may be found at
> @@ -1239,6 +1239,7 @@ EndList
>          return 0
> 
>      def WriteBsfStruct  (self, BsfFd, Item):
> +        LogExpr = CLogicalExpression()
>          if Item['type'] == "None":
>              Space = "gPlatformFspPkgTokenSpaceGuid"
>          else:
> @@ -1260,6 +1261,9 @@ EndList
>                  for Option in OptList:
>                      Option = Option.strip()
>                      (OpVal, OpStr) = Option.split(':')
> +                    test = LogExpr.getNumber (OpVal)
> +                    if test is None:
> +                        raise Exception("Selection Index '%s' is not a
> number" % OpVal)
>                      TmpList.append((OpVal, OpStr))
>          return  TmpList
> 
> --
> 2.9.0.windows.1



      reply	other threads:[~2017-03-16 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15  9:24 [PATCH] IntelFsp2Pkg: Raise exception for invalid BSF option rthomaiy
2017-03-16 14:06 ` Yao, Jiewen [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=74D8A39837DF1E4DA445A8C0B3885C503A905ED9@shsmsx102.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