21EmuBlockIoDriverDiagnosticsRunDiagnostics (
36 EmuBlockIoDriverDiagnosticsRunDiagnostics,
50EmuBlockIoDriverDiagnosticsRunDiagnostics (
123 CHAR8 *SupportedLanguages;
124 BOOLEAN Iso639Language;
128 if ((Language ==
NULL) ||
129 (ErrorType ==
NULL) ||
131 (ControllerHandle ==
NULL) ||
132 (BufferSize ==
NULL))
134 return EFI_INVALID_PARAMETER;
137 SupportedLanguages = This->SupportedLanguages;
138 Iso639Language = (BOOLEAN)(This == &gEmuBlockIoDriverDiagnostics);
143 while (*SupportedLanguages != 0) {
144 if (Iso639Language) {
145 if (
CompareMem (Language, SupportedLanguages, 3) == 0) {
150 SupportedLanguages += 3;
152 for (Index = 0; SupportedLanguages[Index] != 0 && SupportedLanguages[Index] !=
';'; Index++) {
155 if ((
AsciiStrnCmp (SupportedLanguages, Language, Index) == 0) && (Language[Index] == 0)) {
160 SupportedLanguages += Index;
161 for ( ; *SupportedLanguages != 0 && *SupportedLanguages ==
';'; SupportedLanguages++) {
170 return EFI_UNSUPPORTED;
176 *ErrorType = &gEfiBlockIoProtocolGuid;
179 CopyMem (*Buffer, L
"Windows Block I/O Driver Diagnostics Failed\n", *BufferSize);
180 return EFI_DEVICE_ERROR;
186 if (ChildHandle !=
NULL) {
187 return EFI_UNSUPPORTED;
193 Status =
gBS->OpenProtocol (
195 &gEmuIoThunkProtocolGuid,
199 EFI_OPEN_PROTOCOL_BY_DRIVER
202 if (!EFI_ERROR (Status)) {
205 &gEmuIoThunkProtocolGuid,
210 return EFI_UNSUPPORTED;
213 if (Status == EFI_UNSUPPORTED) {
215 }
else if (Status != EFI_ALREADY_STARTED) {
216 return EFI_INVALID_PARAMETER;
INTN EFIAPI AsciiStrnCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString, IN UINTN Length)
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
EFI_STATUS(EFIAPI * EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS)(IN EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType, IN CHAR8 *Language, OUT EFI_GUID **ErrorType, OUT UINTN *BufferSize, OUT CHAR16 **Buffer)
EFI_DRIVER_DIAGNOSTIC_TYPE
@ EfiDriverDiagnosticTypeStandard
#define GLOBAL_REMOVE_IF_UNREFERENCED
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_HANDLE DriverBindingHandle