MmcDxe Diagnostics: return EFI_UNSUPPORTED for Language other than english

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14706 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Olivier Martin 2013-09-23 09:43:51 +00:00 committed by oliviermartin
parent 1d7b547e69
commit c8af31eca6
1 changed files with 11 additions and 5 deletions

View File

@ -17,6 +17,7 @@
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseLib.h>
#include "Mmc.h"
@ -192,6 +193,11 @@ MmcDriverDiagnosticsRunDiagnostics (
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;