X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Nt32Pkg%2FWinNtSerialIoDxe%2FWinNtSerialIo.c;fp=Nt32Pkg%2FWinNtSerialIoDxe%2FWinNtSerialIo.c;h=0dc031393e71199e694687d8f50852c5cc3fda64;hp=bd7424738778688abc7b51154a3737d866a763ae;hb=e74c3676e651f79d27afa986c5837eb1e103fe84;hpb=b4c900588691090ae931a630b93f5c8753677e68 diff --git a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c index bd74247387..0dc031393e 100644 --- a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c +++ b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c @@ -175,6 +175,7 @@ Returns: EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *OpenInfoBuffer; UINTN EntryCount; UINTN Index; + BOOLEAN RemainingDevicePathContainsFlowControl; // // Check RemainingDevicePath validation @@ -261,6 +262,11 @@ Returns: return Status; } + // + // See if RemainingDevicePath has a Flow Control device path node + // + RemainingDevicePathContainsFlowControl = ContainsFlowControl (RemainingDevicePath); + for (Index = 0; Index < EntryCount; Index++) { if ((OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) != 0) { Status = gBS->OpenProtocol ( @@ -271,9 +277,10 @@ Returns: Handle, EFI_OPEN_PROTOCOL_GET_PROTOCOL ); - if (!EFI_ERROR (Status) && - (ContainsFlowControl (RemainingDevicePath) ^ ContainsFlowControl (DevicePath))) { - Status = EFI_UNSUPPORTED; + if (!EFI_ERROR (Status)) { + if (RemainingDevicePathContainsFlowControl ^ ContainsFlowControl (DevicePath)) { + Status = EFI_UNSUPPORTED; + } } break; }