diff options
Diffstat (limited to 'UnixPkg/UnixSerialIoDxe/UnixSerialIo.c')
-rw-r--r-- | UnixPkg/UnixSerialIoDxe/UnixSerialIo.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/UnixPkg/UnixSerialIoDxe/UnixSerialIo.c b/UnixPkg/UnixSerialIoDxe/UnixSerialIo.c index 7afd87bc1e..0f3ac51f55 100644 --- a/UnixPkg/UnixSerialIoDxe/UnixSerialIo.c +++ b/UnixPkg/UnixSerialIoDxe/UnixSerialIo.c @@ -271,6 +271,7 @@ Returns: EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *OpenInfoBuffer;
UINTN EntryCount;
UINTN Index;
+ BOOLEAN RemainingDevicePathContainsFlowControl;
//
// Check RemainingDevicePath validation
@@ -356,6 +357,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 (
@@ -366,9 +372,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;
}
|