From b2665fe3277a2f66f01ffb3ca59b32878ace5b06 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Wed, 4 Dec 2019 16:41:00 +0000 Subject: [PATCH] loader: clean up efipart filter expressions Small cleanup based on illumos review. --- stand/efi/libefi/efipart.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/stand/efi/libefi/efipart.c b/stand/efi/libefi/efipart.c index 62dc3a413e7f..0710a33fdf93 100644 --- a/stand/efi/libefi/efipart.c +++ b/stand/efi/libefi/efipart.c @@ -324,22 +324,21 @@ efipart_ignore_device(EFI_HANDLE h, EFI_BLOCK_IO *blkio, parent_is_usb = true; free(parent); - /* no media, parent is USB and devicepath is lun. */ node = efi_devpath_last_node(devpath); if (node == NULL) return (false); if (parent_is_usb && - DevicePathType(node) == MESSAGING_DEVICE_PATH && - DevicePathSubType(node) == MSG_DEVICE_LOGICAL_UNIT_DP) { - efi_close_devpath(h); - return (true); - } - /* no media, parent is USB and devicepath is SCSI. */ - if (parent_is_usb && - DevicePathType(node) == MESSAGING_DEVICE_PATH && - DevicePathSubType(node) == MSG_SCSI_DP) { - efi_close_devpath(h); - return (true); + DevicePathType(node) == MESSAGING_DEVICE_PATH) { + /* + * no media, parent is USB and devicepath is + * LUN or SCSI. + */ + if (DevicePathSubType(node) == + MSG_DEVICE_LOGICAL_UNIT_DP || + DevicePathSubType(node) == MSG_SCSI_DP) { + efi_close_devpath(h); + return (true); + } } } return (false);