Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Dec 2019 16:41:00 +0000 (UTC)
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355392 - head/stand/efi/libefi
Message-ID:  <201912041641.xB4Gf0kw041479@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tsoome
Date: Wed Dec  4 16:41:00 2019
New Revision: 355392
URL: https://svnweb.freebsd.org/changeset/base/355392

Log:
  loader: clean up efipart filter expressions
  
  Small cleanup based on illumos review.

Modified:
  head/stand/efi/libefi/efipart.c

Modified: head/stand/efi/libefi/efipart.c
==============================================================================
--- head/stand/efi/libefi/efipart.c	Wed Dec  4 15:14:14 2019	(r355391)
+++ head/stand/efi/libefi/efipart.c	Wed Dec  4 16:41:00 2019	(r355392)
@@ -324,22 +324,21 @@ efipart_ignore_device(EFI_HANDLE h, EFI_BLOCK_IO *blki
 			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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912041641.xB4Gf0kw041479>