ShellPkg: Update ping command options to sync with Spec
This patch is used to update ping command options to sync with shell2.2 Spec. Considering the backward compatible issue, the patch keeps ‘-_s’ command option unchanged, only add the new option '-s' and make the old option '-_s' function same as new one. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
The implementation for Ping shell command.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2016, 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
|
||||
@ -197,6 +197,10 @@ STATIC CONST SHELL_PARAM_ITEM PingParamList[] = {
|
||||
L"-n",
|
||||
TypeValue
|
||||
},
|
||||
{
|
||||
L"-s",
|
||||
TypeValue
|
||||
},
|
||||
{
|
||||
L"-_s",
|
||||
TypeValue
|
||||
@ -1512,7 +1516,11 @@ ShellCommandRunPing (
|
||||
//
|
||||
// Parse the paramter of source ip address.
|
||||
//
|
||||
ValueStr = ShellCommandLineGetValue (ParamPackage, L"-_s");
|
||||
ValueStr = ShellCommandLineGetValue (ParamPackage, L"-s");
|
||||
if (ValueStr == NULL) {
|
||||
ValueStr = ShellCommandLineGetValue (ParamPackage, L"-_s");
|
||||
}
|
||||
|
||||
if (ValueStr != NULL) {
|
||||
mSrcString = ValueStr;
|
||||
if (IpChoice == PING_IP_CHOICE_IP6) {
|
||||
|
Reference in New Issue
Block a user