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:
Jiaxin Wu
2016-04-12 11:57:54 +08:00
parent a8c39ba298
commit 0b42d7d8a3
2 changed files with 19 additions and 15 deletions

View File

@ -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) {