Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Use pmatch() so that we can use patterns.



details:   https://anonhg.NetBSD.org/src/rev/e2b03dabda4b
branches:  trunk
changeset: 554884:e2b03dabda4b
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Mon Nov 03 18:51:31 2003 +0000

description:
Use pmatch() so that we can use patterns.

diffstat:

 sys/dev/acpi/acpi.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (37 lines):

diff -r c790bb959e6f -r e2b03dabda4b sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c       Mon Nov 03 18:25:56 2003 +0000
+++ b/sys/dev/acpi/acpi.c       Mon Nov 03 18:51:31 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi.c,v 1.56 2003/11/03 18:07:10 mycroft Exp $        */
+/*     $NetBSD: acpi.c,v 1.57 2003/11/03 18:51:31 mycroft Exp $        */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.56 2003/11/03 18:07:10 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.57 2003/11/03 18:51:31 mycroft Exp $");
 
 #include "opt_acpi.h"
 
@@ -886,13 +886,14 @@
        int i;
 
        while (*ids) {
-               if ((ad->Valid & ACPI_VALID_HID) &&
-                   strcmp(ad->HardwareId.Value, *ids) == 0)
-                       return (1);
+               if (ad->Valid & ACPI_VALID_HID) {
+                       if (pmatch(ad->HardwareId.Value, *ids, NULL) == 2)
+                               return (1);
+               }
 
                if (ad->Valid & ACPI_VALID_CID) {
                        for (i = 0; i < ad->CompatibilityId.Count; i++) {
-                               if (strcmp(ad->CompatibilityId.Id[i].Value, *ids) == 0)
+                               if (pmatch(ad->CompatibilityId.Id[i].Value, *ids, NULL) == 2)
                                        return (1);
                        }
                }



Home | Main Index | Thread Index | Old Index