From: "Carsey, Jaben" <jaben.carsey@intel.com>
To: Tapan Shah <tapandshah@hpe.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Carsey, Jaben" <jaben.carsey@intel.com>
Subject: Re: [PATCH] ShellPkg: handle '-t or -terse' and '-s' flags for 'ver' command properly
Date: Mon, 24 Oct 2016 17:28:06 +0000 [thread overview]
Message-ID: <CB6E33457884FA40993F35157061515C54AA6932@FMSMSX103.amr.corp.intel.com> (raw)
In-Reply-To: <1477328197-1608-1-git-send-email-tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
And pushed.
> -----Original Message-----
> From: Tapan Shah [mailto:tapandshah@hpe.com]
> Sent: Monday, October 24, 2016 9:57 AM
> To: edk2-devel@lists.01.org
> Cc: Carsey, Jaben <jaben.carsey@intel.com>; Tapan Shah
> <tapandshah@hpe.com>
> Subject: [PATCH] ShellPkg: handle '-t or -terse' and '-s' flags for 'ver'
> command properly
> Importance: High
>
> '-t or -terse' and '-s' flags are multiple exclusive
> So when both flags are used together, command should report an error
> message.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Tapan Shah <tapandshah@hpe.com>
> ---
> ShellPkg/Library/UefiShellLevel3CommandsLib/Ver.c | 24
> ++++++++++++++---------
> 1 file changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/ShellPkg/Library/UefiShellLevel3CommandsLib/Ver.c
> b/ShellPkg/Library/UefiShellLevel3CommandsLib/Ver.c
> index deefaf0..d0e2b5c 100644
> --- a/ShellPkg/Library/UefiShellLevel3CommandsLib/Ver.c
> +++ b/ShellPkg/Library/UefiShellLevel3CommandsLib/Ver.c
> @@ -1,6 +1,7 @@
> /** @file
> Main file for Ver shell level 3 function.
>
> + (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
> (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
> Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials
> @@ -84,15 +85,20 @@ ShellCommandRunVer (
> ShellStatus = SHELL_INVALID_PARAMETER;
> } else {
> if (ShellCommandLineGetFlag(Package, L"-s")) {
> - ShellPrintHiiEx (
> - 0,
> - gST->ConOut->Mode->CursorRow,
> - NULL,
> - STRING_TOKEN (STR_VER_OUTPUT_SIMPLE),
> - gShellLevel3HiiHandle,
> - gEfiShellProtocol->MajorVersion,
> - gEfiShellProtocol->MinorVersion
> - );
> + if (ShellCommandLineGetFlag(Package, L"-terse") ||
> ShellCommandLineGetFlag(Package, L"-t")){
> + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN
> (STR_GEN_PARAM_CONFLICT), gShellLevel3HiiHandle, L"ver", L"-t or -terse",
> L"-s");
> + ShellStatus = SHELL_INVALID_PARAMETER;
> + } else {
> + ShellPrintHiiEx (
> + 0,
> + gST->ConOut->Mode->CursorRow,
> + NULL,
> + STRING_TOKEN (STR_VER_OUTPUT_SIMPLE),
> + gShellLevel3HiiHandle,
> + gEfiShellProtocol->MajorVersion,
> + gEfiShellProtocol->MinorVersion
> + );
> + }
> } else {
> ShellPrintHiiEx (
> 0,
> --
> 1.9.5.msysgit.0
prev parent reply other threads:[~2016-10-24 17:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 16:56 [PATCH] ShellPkg: handle '-t or -terse' and '-s' flags for 'ver' command properly Tapan Shah
2016-10-24 17:28 ` Carsey, Jaben [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=CB6E33457884FA40993F35157061515C54AA6932@FMSMSX103.amr.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