From 6715d70e6f2e707c60520a2cff9de2edfb429f0e Mon Sep 17 00:00:00 2001 From: msmith Date: Tue, 5 Dec 2000 00:19:10 +0000 Subject: ACPI HID's aren't limited to 7 characters. Don't check the length of the HID passed in as an argument at all; callers are typically going to be sending us static strings anyway. Submitted by: Munehiro Matsuda --- sys/dev/acpica/acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/acpica') diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index eeb325c..5095c54 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -644,13 +644,13 @@ acpi_MatchHid(device_t dev, char *hid) ACPI_DEVICE_INFO devinfo; ACPI_STATUS error; - if ((hid == NULL) || (strlen(hid) != 7)) + if (hid == NULL) return(FALSE); if ((h = acpi_get_handle(dev)) == NULL) return(FALSE); if ((error = AcpiGetObjectInfo(h, &devinfo)) != AE_OK) return(FALSE); - if ((devinfo.Valid & ACPI_VALID_HID) && !strncmp(hid, devinfo.HardwareId, 7)) + if ((devinfo.Valid & ACPI_VALID_HID) && !strcmp(hid, devinfo.HardwareId)) return(TRUE); return(FALSE); } -- cgit v1.1