mirror of https://github.com/acidanthera/audk.git
ShellPkg: Add error prompt message in Ifconfig6 command.
v2: update the prompt message more readable. It should display error prompt message when Ifconfig6 can not configure correctly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed by : Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
parent
aa63a86601
commit
445d200762
|
@ -61,7 +61,7 @@
|
|||
#string STR_PING_RTT #language en-US "\nRtt(round trip time) min=%d~%dms max=%d~%dms avg=%d~%dms\r\n"
|
||||
|
||||
#string STR_IFCONFIG_UNSUPPORTED_OPTION #language en-US "The option '%H%s%N' is unsupported now.\n"
|
||||
#string STR_IFCONFIG_LACK_OPTION #language en-US "Flags lack.\n"
|
||||
#string STR_IFCONFIG_LACK_OPTION #language en-US "Flags lack. Please type 'ifConfig -?' for help info.\n"
|
||||
#string STR_IFCONFIG_LACK_INTERFACE #language en-US "Lack interface name.\n"
|
||||
#string STR_IFCONFIG_LACK_COMMAND #language en-US "Lack interface config option.\n"
|
||||
#string STR_IFCONFIG_INVALID_INTERFACE #language en-US "Invalid interface name.\n"
|
||||
|
|
|
@ -1317,6 +1317,20 @@ IfConfig6SetInterfaceInfo (
|
|||
|
||||
VarArg= VarArg->Next;
|
||||
|
||||
if (StrCmp (VarArg->Arg, L"host") == 0) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IFCONFIG6_ERR_INVALID_IP_CONFIG), gShellNetwork2HiiHandle, Status);
|
||||
ShellStatus = EFI_INVALID_PARAMETER;
|
||||
goto ON_EXIT;
|
||||
} else if (StrCmp (VarArg->Arg, L"gw") == 0) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IFCONFIG6_ERR_INVALID_GW_CONFIG), gShellNetwork2HiiHandle, Status);
|
||||
ShellStatus = EFI_INVALID_PARAMETER;
|
||||
goto ON_EXIT;
|
||||
} else if (StrCmp (VarArg->Arg, L"dns") == 0) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IFCONFIG6_ERR_INVALID_DNS_CONFIG), gShellNetwork2HiiHandle, Status);
|
||||
ShellStatus = EFI_INVALID_PARAMETER;
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
} else if (StrCmp (VarArg->Arg, L"man") == 0) {
|
||||
//
|
||||
// Set manual config policy.
|
||||
|
@ -1511,6 +1525,7 @@ IfConfig6SetInterfaceInfo (
|
|||
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IFCONFIG6_ERR_MAN_GW), gShellNetwork2HiiHandle, Status);
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,15 @@
|
|||
#string STR_IFCONFIG6_ERR_LACK_OPTION #language en-US "Lack options.\r\n"
|
||||
"Hint: Please type 'IfConfig6 -?' for help info.\r\n"
|
||||
#string STR_IFCONFIG6_ERR_MAN_HOST #language en-US "Manual address configuration failed. Please retry.\r\n"
|
||||
|
||||
#string STR_IFCONFIG6_ERR_MAN_GW #language en-US "Gateway address configuration failed. Please check the argument.\r\n"
|
||||
|
||||
#string STR_IFCONFIG6_ERR_INVALID_IP_CONFIG #language en-US "The IP address is not configurable when the policy is Ip6ConfigPolicyAutomatic.\r\n"
|
||||
|
||||
#string STR_IFCONFIG6_ERR_INVALID_GW_CONFIG #language en-US "The gateway address is not configurable when the policy is Ip6ConfigPolicyAutomatic.\r\n"
|
||||
|
||||
#string STR_IFCONFIG6_ERR_INVALID_DNS_CONFIG #language en-US "The DNS server address is not configurable when the policy is Ip6ConfigPolicyAutomatic.\r\n"
|
||||
|
||||
#string STR_IFCONFIG6_ERR_DUPLICATE_COMMAND #language en-US "Duplicate commands. Bad command %H%s%N is skipped.\r\n"
|
||||
"Hint: Please type 'IfConfig6 -?' for help info.\r\n"
|
||||
#string STR_IFCONFIG6_ERR_CONFLICT_COMMAND #language en-US "Conflict commands. Bad command %H%s%N is skipped.\r\n"
|
||||
|
|
Loading…
Reference in New Issue