audk/ShellPkg/Library
Laszlo Ersek 038720e899 ShellPkg/UefiShellLevel2CommandsLib: add missing EFIAPI call conv spec
UefiShellLevel2CommandsLib (somewhat questionably) calls the
BaseLib-internal function InternalCharToUpper().

This function is declared in "MdePkg/Library/BaseLib/BaseLibInternals.h",
which is not a public library class header. UefiShellLevel2CommandsLib
therefore duplicates the function declaration, but a mistake was made: the
EFIAPI calling convention is not spelled out on the duplicated
declaration. Therefore calls made from UefiShellLevel2CommandsLib will not
match the actual function definition in "MdePkg/Library/BaseLib/String.c",
when GCC/X64 toolchains are used.

One consequence of this is that cross-filesystem copies don't work in the
UEFI shell (see the StrniCmp() function in
"UefiShellLevel2CommandsLib.c"). From the original report:

> FS0:\efi\ubuntu\> cp grubx64.efi fs1:\
>
> cp: The source and destination are the same.

Copy the declaration from "BaseLibInternals.h" to
"UefiShellLevel2CommandsLib.c" verbatim.

Reported-by: Rebecca Cran <rebecca@bluestop.org>
Analyzed-by: Thomas Palmer <thomas.palmer@hpe.com>
Analyzed-by: Liming Gao <liming.gao@intel.com>
Ref: http://mid.mail-archive.com/47cd17d8-f022-6ca5-2f52-06a8250f8d14@cran.org.uk
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Rebecca Cran <rebecca@bluestop.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Thomas Palmer <thomas.palmer@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2018-01-08 23:15:02 +01:00
..
UefiHandleParsingLib ShellPkg/dh: Fix wrong output when dumping PciRootBridgeIo 2017-11-08 13:06:16 +08:00
UefiShellBcfgCommandLib ShellPkg: Fix misuses of AllocateCopyPool 2017-11-08 17:13:04 +08:00
UefiShellCEntryLib ShellPkg: Fix typos in comments and variables 2016-11-15 11:05:34 +08:00
UefiShellCommandLib ShellPkg: Fix bug that fails to change CWD after "map -r". 2017-08-30 11:42:49 +08:00
UefiShellDebug1CommandsLib ShellPkg/HexEdit: Fix EBC build failure 2017-11-07 10:17:28 +08:00
UefiShellDriver1CommandsLib ShellPkg/disconnect: '-r' is not optional when disconnecting all 2017-09-29 15:19:10 +08:00
UefiShellInstall1CommandsLib
UefiShellLevel1CommandsLib
UefiShellLevel2CommandsLib ShellPkg/UefiShellLevel2CommandsLib: add missing EFIAPI call conv spec 2018-01-08 23:15:02 +01:00
UefiShellLevel3CommandsLib ShellPkg/alias: Fix flag parsing logic 2017-10-20 12:54:36 +08:00
UefiShellLib ShellPkg/ShellLib: Fix dynamic command fails to start during boot 2017-11-29 10:31:54 +08:00
UefiShellNetwork1CommandsLib ShellPkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout. 2017-12-18 16:38:24 +08:00
UefiShellNetwork2CommandsLib ShellPkg: Fix a build error in Ping6 shell command. 2017-12-18 17:52:02 +08:00