loader: clean up efipart filter expressions

Small cleanup based on illumos review.
This commit is contained in:
Toomas Soome 2019-12-04 16:41:00 +00:00
parent d48778bb2a
commit b2665fe327
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355392

View File

@ -324,22 +324,21 @@ efipart_ignore_device(EFI_HANDLE h, EFI_BLOCK_IO *blkio,
parent_is_usb = true; parent_is_usb = true;
free(parent); free(parent);
/* no media, parent is USB and devicepath is lun. */
node = efi_devpath_last_node(devpath); node = efi_devpath_last_node(devpath);
if (node == NULL) if (node == NULL)
return (false); return (false);
if (parent_is_usb && if (parent_is_usb &&
DevicePathType(node) == MESSAGING_DEVICE_PATH && DevicePathType(node) == MESSAGING_DEVICE_PATH) {
DevicePathSubType(node) == MSG_DEVICE_LOGICAL_UNIT_DP) { /*
efi_close_devpath(h); * no media, parent is USB and devicepath is
return (true); * LUN or SCSI.
} */
/* no media, parent is USB and devicepath is SCSI. */ if (DevicePathSubType(node) ==
if (parent_is_usb && MSG_DEVICE_LOGICAL_UNIT_DP ||
DevicePathType(node) == MESSAGING_DEVICE_PATH && DevicePathSubType(node) == MSG_SCSI_DP) {
DevicePathSubType(node) == MSG_SCSI_DP) { efi_close_devpath(h);
efi_close_devpath(h); return (true);
return (true); }
} }
} }
return (false); return (false);