audk/ShellPkg/Library/UefiShellLevel2CommandsLib
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
..
Attrib.c
Cd.c ShellPkg: Refine type cast for pointer subtraction 2017-03-06 14:16:00 +08:00
Cp.c ShellPkg/UefiShellLevel2CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:49 +08:00
Load.c ShellPkg/UefiShellLevel2CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:49 +08:00
Ls.c ShellPkg/ls: Display the file time in local time. 2017-07-26 13:31:17 +08:00
Map.c ShellPkg/map: Recognize CDROM change 2017-07-26 17:19:28 +08:00
MkDir.c ShellPkg/mkdir: support creating nested directories 2017-08-21 10:42:39 +08:00
Mv.c ShellPkg/MV: Fix MV to deny moving parent of current directory 2016-12-05 09:18:32 +08:00
Parse.c ShellPkg/parse: Handle Unicode stream from pipe correctly 2017-06-07 08:51:41 +08:00
Reset.c ShellPkg/reset: Support "-fwui" flag 2016-11-07 10:43:27 +08:00
Rm.c ShellPkg/UefiShellLevel2CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:49 +08:00
Set.c ShellPkg/UefiShellLevel2CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:49 +08:00
TimeDate.c ShellPkg/UefiShellLevel2CommandsLib: rebase to ARRAY_SIZE() 2016-10-27 11:15:20 +02:00
UefiShellLevel2CommandsLib.c ShellPkg/UefiShellLevel2CommandsLib: add missing EFIAPI call conv spec 2018-01-08 23:15:02 +01:00
UefiShellLevel2CommandsLib.h ShellPkg/reset: Support "-fwui" flag 2016-11-07 10:43:27 +08:00
UefiShellLevel2CommandsLib.inf ShellPkg: Update Guid/Protocol usages in INF files. 2016-04-13 14:52:59 +08:00
UefiShellLevel2CommandsLib.uni Shell/mkdir: Modify the help content to align to spec. 2017-08-21 10:42:39 +08:00
Vol.c ShellPkg/UefiShellLevel2CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:49 +08:00