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;
|
goto NextHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ShellStatus = SHELL_SUCCESS;
|
||||||
|
|
||||||
NextHandle:
|
NextHandle:
|
||||||
|
|
||||||
CloseProtocolAndDestroyServiceChild (
|
CloseProtocolAndDestroyServiceChild (
|
||||||
|
@ -575,6 +577,10 @@ RunTftp (
|
||||||
FreePool (Handles);
|
FreePool (Handles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((ShellStatus != SHELL_SUCCESS) && (EFI_ERROR(Status))) {
|
||||||
|
ShellStatus = Status & ~MAX_BIT;
|
||||||
|
}
|
||||||
|
|
||||||
return ShellStatus;
|
return ShellStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue