Revision: 14706
http://sourceforge.net/p/edk2/code/14706
Author: oliviermartin
Date: 2013-09-23 09:43:51 +0000 (Mon, 23 Sep 2013)
Log Message:
-----------
MmcDxe Diagnostics: return EFI_UNSUPPORTED for Language other than english
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <[email protected]>
Modified Paths:
--------------
trunk/edk2/EmbeddedPkg/Universal/MmcDxe/Diagnostics.c
Modified: trunk/edk2/EmbeddedPkg/Universal/MmcDxe/Diagnostics.c
===================================================================
--- trunk/edk2/EmbeddedPkg/Universal/MmcDxe/Diagnostics.c 2013-09-23
09:42:53 UTC (rev 14705)
+++ trunk/edk2/EmbeddedPkg/Universal/MmcDxe/Diagnostics.c 2013-09-23
09:43:51 UTC (rev 14706)
@@ -17,6 +17,7 @@
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
+#include <Library/BaseLib.h>
#include "Mmc.h"
@@ -31,7 +32,7 @@
)
{
mLogRemainChar = MaxBufferChar;
- mLogBuffer = AllocatePool ((UINTN)MaxBufferChar * sizeof(CHAR16));
+ mLogBuffer = AllocatePool ((UINTN)MaxBufferChar * sizeof (CHAR16));
return mLogBuffer;
}
@@ -79,8 +80,8 @@
for (i = 0; i < (BufferSize >> 3); i++) {
if (*BufferA64 != *BufferB64) {
- DEBUG((EFI_D_ERROR, "CompareBuffer: Error at %i", i));
- DEBUG((EFI_D_ERROR, "(0x%lX) != (0x%lX)\n", *BufferA64, *BufferB64));
+ DEBUG ((EFI_D_ERROR, "CompareBuffer: Error at %i", i));
+ DEBUG ((EFI_D_ERROR, "(0x%lX) != (0x%lX)\n", *BufferA64, *BufferB64));
return FALSE;
}
BufferA64++;
@@ -192,6 +193,11 @@
return EFI_INVALID_PARAMETER;
}
+ // Check Language is supported (i.e. is "en-*" - only English is supported)
+ if (AsciiStrnCmp (Language, "en", 2) != 0) {
+ return EFI_UNSUPPORTED;
+ }
+
Status = EFI_SUCCESS;
*ErrorType = NULL;
*BufferSize = DIAGNOSTIC_LOGBUFFER_MAXCHAR;
@@ -202,8 +208,8 @@
// For each MMC instance
CurrentLink = mMmcHostPool.ForwardLink;
while (CurrentLink != NULL && CurrentLink != &mMmcHostPool && (Status ==
EFI_SUCCESS)) {
- MmcHostInstance = MMC_HOST_INSTANCE_FROM_LINK(CurrentLink);
- ASSERT(MmcHostInstance != NULL);
+ MmcHostInstance = MMC_HOST_INSTANCE_FROM_LINK (CurrentLink);
+ ASSERT (MmcHostInstance != NULL);
// LBA=1 Size=BlockSize
DiagnosticLog (L"MMC Driver Diagnostics - Test: First Block\n");
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits