mirror of https://github.com/acidanthera/audk.git
ShellPkg/TftpDynamicCommand: Return proper status
Tftp command always returned "SHELL_NOT_FOUND" which is treated as an error by callers. Add missing line to clean the ShellStatus on successful operation. If operation has failed, return the error status if available. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1487 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Reviewed-by: Songpeng Li <songpeng.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
parent
9084239f34
commit
83463154af
|
@ -548,6 +548,8 @@ RunTftp (
|
|||
goto NextHandle;
|
||||
}
|
||||
|
||||
ShellStatus = SHELL_SUCCESS;
|
||||
|
||||
NextHandle:
|
||||
|
||||
CloseProtocolAndDestroyServiceChild (
|
||||
|
@ -575,6 +577,10 @@ RunTftp (
|
|||
FreePool (Handles);
|
||||
}
|
||||
|
||||
if ((ShellStatus != SHELL_SUCCESS) && (EFI_ERROR(Status))) {
|
||||
ShellStatus = Status & ~MAX_BIT;
|
||||
}
|
||||
|
||||
return ShellStatus;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue