From a5cc5fcef6bc9152cd6a72fc4e2e865a9811c8ac Mon Sep 17 00:00:00 2001 From: Vladimir Kondratyev Date: Sat, 5 Dec 2020 10:55:14 +0000 Subject: [PATCH] atkbd(4): Change quirk table end-of-list marker to NULL vendor/maker/product This fixes regression introduced in r367349 which effectively resulted in truncation of quirk table. PR: 250711 Submitted by: grembo Reported by: Matthias Apitz X-MFC with: r367349 --- sys/dev/atkbdc/atkbdc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/atkbdc/atkbdc.c b/sys/dev/atkbdc/atkbdc.c index 068faeeb9565..c80ec939eb7d 100644 --- a/sys/dev/atkbdc/atkbdc.c +++ b/sys/dev/atkbdc/atkbdc.c @@ -133,7 +133,8 @@ atkbdc_getquirks(void) char* maker = kern_getenv("smbios.system.maker"); char* product = kern_getenv("smbios.system.product"); - for (i=0; quirks[i].quirk != 0; ++i) + for (i=0; quirks[i].bios_vendor != NULL || quirks[i].maker != NULL || + quirks[i].product != NULL; ++i) if (QUIRK_STR_MATCH(quirks[i].bios_vendor, bios_vendor) && QUIRK_STR_MATCH(quirks[i].maker, maker) && QUIRK_STR_MATCH(quirks[i].product, product))