svn commit: r323909 - head/sys/boot/efi/libefi

Toomas Soome tsoome at FreeBSD.org
Fri Sep 22 07:44:37 UTC 2017


Author: tsoome
Date: Fri Sep 22 07:44:36 2017
New Revision: 323909
URL: https://svnweb.freebsd.org/changeset/base/323909

Log:
  libefi: define EISA PNP constants
  
  Define EISA PNP constants and use them, also fix ID for 0x701

Modified:
  head/sys/boot/efi/libefi/efipart.c

Modified: head/sys/boot/efi/libefi/efipart.c
==============================================================================
--- head/sys/boot/efi/libefi/efipart.c	Fri Sep 22 07:40:05 2017	(r323908)
+++ head/sys/boot/efi/libefi/efipart.c	Fri Sep 22 07:44:36 2017	(r323909)
@@ -58,6 +58,11 @@ static int efipart_printfd(int);
 static int efipart_printcd(int);
 static int efipart_printhd(int);
 
+/* EISA PNP ID's for floppy controllers */
+#define	PNP0604	0x604
+#define	PNP0700	0x700
+#define	PNP0701	0x701
+
 struct devsw efipart_fddev = {
 	.dv_name = "fd",
 	.dv_type = DEVT_FD,
@@ -181,9 +186,9 @@ efipart_floppy(EFI_DEVICE_PATH *node)
 	if (DevicePathType(node) == ACPI_DEVICE_PATH &&
 	    DevicePathSubType(node) == ACPI_DP) {
 		acpi = (ACPI_HID_DEVICE_PATH *) node;
-		if (acpi->HID == EISA_PNP_ID(0x604) ||
-		    acpi->HID == EISA_PNP_ID(0x700) ||
-		    acpi->HID == EISA_ID(0x41d1, 0x701)) {
+		if (acpi->HID == EISA_PNP_ID(PNP0604) ||
+		    acpi->HID == EISA_PNP_ID(PNP0700) ||
+		    acpi->HID == EISA_PNP_ID(PNP0701)) {
 			return (acpi);
 		}
 	}


More information about the svn-src-all mailing list