ShellPkg: Add error message if failed to place receive token in ping command.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The implementation for Ping6 application.
|
||||
|
||||
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2016 - 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
|
||||
@ -474,6 +474,7 @@ ON_EXIT:
|
||||
Status = Private->Ip6->Receive (Private->Ip6, RxToken);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_PING6_IP6_RECEIVE), gShellNetwork2HiiHandle, Status);
|
||||
Private->Status = EFI_ABORTED;
|
||||
}
|
||||
} else {
|
||||
@ -658,7 +659,11 @@ Ping6OnReceiveEchoReply (
|
||||
|
||||
Private->RxToken.Status = EFI_NOT_READY;
|
||||
|
||||
return Private->Ip6->Receive (Private->Ip6, &Private->RxToken);
|
||||
Status = Private->Ip6->Receive (Private->Ip6, &Private->RxToken);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_PING6_IP6_RECEIVE), gShellNetwork2HiiHandle, Status);
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,6 +33,7 @@
|
||||
#string STR_PING6_INVALID_BUFFER_SIZE #language en-US "%Ping6: Invalid buffer size, %s\r\n"
|
||||
#string STR_PING6_INVALID_SOURCE #language en-US "%Ping6: Require source interface option\r\n"
|
||||
#string STR_PING6_IP6_CONFIG #language en-US "%Ping6: The process of Ip6 Configure %r\r\n"
|
||||
#string STR_PING6_IP6_RECEIVE #language en-US "%Ping6: Place the receive token %r\r\n"
|
||||
#string STR_PING6_IP6CFG_GETDATA #language en-US "%Ping6: Get data of the interface information %r\r\n"
|
||||
#string STR_PING6_SEND_REQUEST #language en-US "Echo request sequence %d fails.\r\n"
|
||||
#string STR_PING6_CONFIGD_NIC_NF #language en-US "%Ping6: No configured interfaces were found.\r\n"
|
||||
|
Reference in New Issue
Block a user