[edk2,1/1] ShellPkg/UefiShellLevel2CommandsLib: Fix "cp" for GCC systems

Message ID 1485920100-33234-1-git-send-email-thomas.palmer@hpe.com
State New
Headers show
Series
  • [edk2,1/1] ShellPkg/UefiShellLevel2CommandsLib: Fix "cp" for GCC systems
Related show

Commit Message

Thomas Palmer Feb. 1, 2017, 3:35 a.m.
On GCC built UEFIs, the "cp" command fails with "The source and
destination are the same".

The root cause is that StrniCmp failed to detect a case-
insensitive string difference due to the InternalCharToUpper function
being improperly declared.

Fix is to add missing EFIAPI token to match the original
implementation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>

---
 .../Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c     | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.7.4

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Ni, Ruiyu Feb. 3, 2017, 8:06 a.m. | #1
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>


Regards,
Ray

>-----Original Message-----

>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Thomas Palmer

>Sent: Wednesday, February 1, 2017 11:35 AM

>To: edk2-devel@lists.01.org

>Cc: Ni, Ruiyu <ruiyu.ni@intel.com>

>Subject: [edk2] [PATCH 1/1] ShellPkg/UefiShellLevel2CommandsLib: Fix "cp" for GCC systems

>

>On GCC built UEFIs, the "cp" command fails with "The source and

>destination are the same".

>

>The root cause is that StrniCmp failed to detect a case-

>insensitive string difference due to the InternalCharToUpper function

>being improperly declared.

>

>Fix is to add missing EFIAPI token to match the original

>implementation.

>

>Contributed-under: TianoCore Contribution Agreement 1.0

>Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>

>---

> .../Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c     | 2 ++

> 1 file changed, 2 insertions(+)

>

>diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c

>b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c

>index 7948e53cfc46..4dbff4de26f8 100644

>--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c

>+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c

>@@ -21,6 +21,7 @@

>

>   * functions are non-interactive only

>

>+  (C) Copyright 2017 Hewlett Packard Enterprise Development LP<BR>

>   Copyright (c) 2014 Hewlett-Packard Development Company, L.P.

>   Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>

>   This program and the accompanying materials

>@@ -268,6 +269,7 @@ VerifyIntermediateDirectories (

>   @return Char as an upper case character.

> **/

> CHAR16

>+EFIAPI

> InternalCharToUpper (

>   IN CONST CHAR16                    Char

>   );

>--

>2.7.4

>

>_______________________________________________

>edk2-devel mailing list

>edk2-devel@lists.01.org

>https://lists.01.org/mailman/listinfo/edk2-devel

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Carsey, Jaben Feb. 3, 2017, 5:45 p.m. | #2
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


> -----Original Message-----

> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ni,

> Ruiyu

> Sent: Friday, February 3, 2017 12:06 AM

> To: Thomas Palmer <thomas.palmer@hpe.com>; edk2-devel@lists.01.org

> Subject: Re: [edk2] [PATCH 1/1] ShellPkg/UefiShellLevel2CommandsLib: Fix "cp"

> for GCC systems

> Importance: High

> 

> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

> 

> Regards,

> Ray

> 

> >-----Original Message-----

> >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of

> >Thomas Palmer

> >Sent: Wednesday, February 1, 2017 11:35 AM

> >To: edk2-devel@lists.01.org

> >Cc: Ni, Ruiyu <ruiyu.ni@intel.com>

> >Subject: [edk2] [PATCH 1/1] ShellPkg/UefiShellLevel2CommandsLib: Fix

> >"cp" for GCC systems

> >

> >On GCC built UEFIs, the "cp" command fails with "The source and

> >destination are the same".

> >

> >The root cause is that StrniCmp failed to detect a case- insensitive

> >string difference due to the InternalCharToUpper function being

> >improperly declared.

> >

> >Fix is to add missing EFIAPI token to match the original

> >implementation.

> >

> >Contributed-under: TianoCore Contribution Agreement 1.0

> >Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>

> >---

> > .../Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c     | 2

> ++

> > 1 file changed, 2 insertions(+)

> >

> >diff --git

> >a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLi

> >b.c

> >b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLi

> >b.c index 7948e53cfc46..4dbff4de26f8 100644

> >---

> >a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLi

> >b.c

> >+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Comman

> >+++ dsLib.c

> >@@ -21,6 +21,7 @@

> >

> >   * functions are non-interactive only

> >

> >+  (C) Copyright 2017 Hewlett Packard Enterprise Development LP<BR>

> >   Copyright (c) 2014 Hewlett-Packard Development Company, L.P.

> >   Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>

> >   This program and the accompanying materials @@ -268,6 +269,7 @@

> >VerifyIntermediateDirectories (

> >   @return Char as an upper case character.

> > **/

> > CHAR16

> >+EFIAPI

> > InternalCharToUpper (

> >   IN CONST CHAR16                    Char

> >   );

> >--

> >2.7.4

> >

> >_______________________________________________

> >edk2-devel mailing list

> >edk2-devel@lists.01.org

> >https://lists.01.org/mailman/listinfo/edk2-devel

> _______________________________________________

> edk2-devel mailing list

> edk2-devel@lists.01.org

> https://lists.01.org/mailman/listinfo/edk2-devel

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Patch hide | download patch | download mbox

diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c
index 7948e53cfc46..4dbff4de26f8 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c
@@ -21,6 +21,7 @@ 
 
   * functions are non-interactive only
 
+  (C) Copyright 2017 Hewlett Packard Enterprise Development LP<BR>
   Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
   Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
   This program and the accompanying materials
@@ -268,6 +269,7 @@  VerifyIntermediateDirectories (
   @return Char as an upper case character.
 **/
 CHAR16
+EFIAPI
 InternalCharToUpper (
   IN CONST CHAR16                    Char
   );