NetworkPkg/HttpBootDxe: Avoid to corrupt HttpBootDxe setup screen.
When giving an invalid URI in Boot URI field within HTTP Boot
configuration page, the AsciiPrint will corrupt the setup screen.
This patch is to resolve the issue.
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Karunakar P <karunakarp@amiindia.co.in>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
(cherry picked from commit 7ee089f604
)
This commit is contained in:
@ -238,6 +238,11 @@ HttpBootDhcp4ExtractUriInfo (
|
||||
Status = HttpBootCheckUriScheme (Private->BootFileUri);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "HttpBootDhcp4ExtractUriInfo: %r.\n", Status));
|
||||
if (Status == EFI_INVALID_PARAMETER) {
|
||||
AsciiPrint ("\n Error: Invalid URI address.\n");
|
||||
} else if (Status == EFI_ACCESS_DENIED) {
|
||||
AsciiPrint ("\n Error: Access forbidden, only HTTPS connection is allowed.\n");
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -373,6 +378,11 @@ HttpBootDhcp6ExtractUriInfo (
|
||||
Status = HttpBootCheckUriScheme (Private->BootFileUri);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "HttpBootDhcp6ExtractUriInfo: %r.\n", Status));
|
||||
if (Status == EFI_INVALID_PARAMETER) {
|
||||
AsciiPrint ("\n Error: Invalid URI address.\n");
|
||||
} else if (Status == EFI_ACCESS_DENIED) {
|
||||
AsciiPrint ("\n Error: Access forbidden, only HTTPS connection is allowed.\n");
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user