Message ID | 1371801922-15142-6-git-send-email-ryan.harkin@linaro.org |
---|---|
State | New |
Headers | show |
I committed this change after fixing the coding style (revision 14437). > -----Original Message----- > From: Ryan Harkin [mailto:ryan.harkin@linaro.org] > Sent: 21 June 2013 09:05 > To: ryan.harkin@linaro.org; edk2-devel@lists.sourceforge.net; > patches@linaro.org; boot-architecture@lists.linaro.org; Olivier Martin > Subject: [PATCH 5/9] ArmPlatformPkg/Bds: Make ".EFI" files recognizable > as EFI applications. > > From: Leif Lindholm <leif.lindholm@linaro.org> > > Currently, only ".efi" files are recognized as valid ARM UEFI > applications by BDS. This patch also makes ".EFI" files recognised. > > Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> > --- > ArmPlatformPkg/Bds/BdsHelper.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/ArmPlatformPkg/Bds/BdsHelper.c > b/ArmPlatformPkg/Bds/BdsHelper.c > index fa3026c..d1889f4 100644 > --- a/ArmPlatformPkg/Bds/BdsHelper.c > +++ b/ArmPlatformPkg/Bds/BdsHelper.c > @@ -205,6 +205,9 @@ HasFilePathEfiExtension ( > IN CHAR16* FilePath > ) > { > + if (StrCmp (FilePath + (StrSize(FilePath)/sizeof(CHAR16)) - 5, > L".EFI") == 0) > + return 1; > + > return (StrCmp (FilePath + (StrSize(FilePath)/sizeof(CHAR16)) - 5, > L".efi") == 0); > } > > -- > 1.7.9.5 >
On 21 June 2013 11:02, Olivier Martin <olivier.martin@arm.com> wrote: > I committed this change after fixing the coding style (revision 14437). Yes, your revised version is more appropriate. Thanks. > >> -----Original Message----- >> From: Ryan Harkin [mailto:ryan.harkin@linaro.org] >> Sent: 21 June 2013 09:05 >> To: ryan.harkin@linaro.org; edk2-devel@lists.sourceforge.net; >> patches@linaro.org; boot-architecture@lists.linaro.org; Olivier Martin >> Subject: [PATCH 5/9] ArmPlatformPkg/Bds: Make ".EFI" files recognizable >> as EFI applications. >> >> From: Leif Lindholm <leif.lindholm@linaro.org> >> >> Currently, only ".efi" files are recognized as valid ARM UEFI >> applications by BDS. This patch also makes ".EFI" files recognised. >> >> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> >> --- >> ArmPlatformPkg/Bds/BdsHelper.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/ArmPlatformPkg/Bds/BdsHelper.c >> b/ArmPlatformPkg/Bds/BdsHelper.c >> index fa3026c..d1889f4 100644 >> --- a/ArmPlatformPkg/Bds/BdsHelper.c >> +++ b/ArmPlatformPkg/Bds/BdsHelper.c >> @@ -205,6 +205,9 @@ HasFilePathEfiExtension ( >> IN CHAR16* FilePath >> ) >> { >> + if (StrCmp (FilePath + (StrSize(FilePath)/sizeof(CHAR16)) - 5, >> L".EFI") == 0) >> + return 1; >> + >> return (StrCmp (FilePath + (StrSize(FilePath)/sizeof(CHAR16)) - 5, >> L".efi") == 0); >> } >> >> -- >> 1.7.9.5 >> > > > > > > _______________________________________________ > boot-architecture mailing list > boot-architecture@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/boot-architecture
On Fri, Jun 21, 2013 at 9:05 AM, Ryan Harkin <ryan.harkin@linaro.org> wrote: > From: Leif Lindholm <leif.lindholm@linaro.org> > > Currently, only ".efi" files are recognized as valid ARM UEFI > applications by BDS. This patch also makes ".EFI" files recognised. > > Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> > --- > ArmPlatformPkg/Bds/BdsHelper.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/ArmPlatformPkg/Bds/BdsHelper.c b/ArmPlatformPkg/Bds/BdsHelper.c > index fa3026c..d1889f4 100644 > --- a/ArmPlatformPkg/Bds/BdsHelper.c > +++ b/ArmPlatformPkg/Bds/BdsHelper.c > @@ -205,6 +205,9 @@ HasFilePathEfiExtension ( > IN CHAR16* FilePath > ) > { > + if (StrCmp (FilePath + (StrSize(FilePath)/sizeof(CHAR16)) - 5, L".EFI") == 0) > + return 1; > + Hmmm... we really should have an StrCaseCmp implementation in efi. > return (StrCmp (FilePath + (StrSize(FilePath)/sizeof(CHAR16)) - 5, L".efi") == 0); > } > > -- > 1.7.9.5 > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel
On Jun 21, 2013, at 3:14 AM, Grant Likely <grant.likely@secretlab.ca> wrote: > On Fri, Jun 21, 2013 at 9:05 AM, Ryan Harkin <ryan.harkin@linaro.org> wrote: >> From: Leif Lindholm <leif.lindholm@linaro.org> >> >> Currently, only ".efi" files are recognized as valid ARM UEFI >> applications by BDS. This patch also makes ".EFI" files recognised. >> >> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> >> --- >> ArmPlatformPkg/Bds/BdsHelper.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/ArmPlatformPkg/Bds/BdsHelper.c b/ArmPlatformPkg/Bds/BdsHelper.c >> index fa3026c..d1889f4 100644 >> --- a/ArmPlatformPkg/Bds/BdsHelper.c >> +++ b/ArmPlatformPkg/Bds/BdsHelper.c >> @@ -205,6 +205,9 @@ HasFilePathEfiExtension ( >> IN CHAR16* FilePath >> ) >> { >> + if (StrCmp (FilePath + (StrSize(FilePath)/sizeof(CHAR16)) - 5, L".EFI") == 0) >> + return 1; >> + > > Hmmm... we really should have an StrCaseCmp implementation in efi. > It is implemented as a member in the EFI_UNICODE_COLLATION_PROTOCOL as defined by the UEFI spec. https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdePkg/Include/Protocol/UnicodeCollation.h It exists since case insensitive compares are required for the FAT filesystem driver. I think it is only currently used in the FAT driver so that is why we did not end up with a library to wrap the protocol. Thanks, Andrew Fish >> return (StrCmp (FilePath + (StrSize(FilePath)/sizeof(CHAR16)) - 5, L".efi") == 0); >> } >> >> -- >> 1.7.9.5 >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Windows: >> >> Build for Windows Store. >> >> http://p.sf.net/sfu/windows-dev2dev >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/edk2-devel > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel
diff --git a/ArmPlatformPkg/Bds/BdsHelper.c b/ArmPlatformPkg/Bds/BdsHelper.c index fa3026c..d1889f4 100644 --- a/ArmPlatformPkg/Bds/BdsHelper.c +++ b/ArmPlatformPkg/Bds/BdsHelper.c @@ -205,6 +205,9 @@ HasFilePathEfiExtension ( IN CHAR16* FilePath ) { + if (StrCmp (FilePath + (StrSize(FilePath)/sizeof(CHAR16)) - 5, L".EFI") == 0) + return 1; + return (StrCmp (FilePath + (StrSize(FilePath)/sizeof(CHAR16)) - 5, L".efi") == 0); }