diff --git a/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h b/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h --- a/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h +++ b/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h @@ -55,7 +55,8 @@ }; struct dmi_strmatch { - unsigned char slot; + unsigned char slot : 7; + unsigned char exact_match : 1; char substr[79]; }; @@ -67,6 +68,6 @@ }; #define DMI_MATCH(a, b) { .slot = a, .substr = b } -#define DMI_EXACT_MATCH(a, b) { .slot = a, .substr = b, } +#define DMI_EXACT_MATCH(a, b) { .slot = a, .substr = b, .exact_match = 1 } #endif /* __LINUXKPI_LINUX_MOD_DEVICETABLE_H__ */ diff --git a/sys/compat/linuxkpi/common/src/linux_dmi.c b/sys/compat/linuxkpi/common/src/linux_dmi.c --- a/sys/compat/linuxkpi/common/src/linux_dmi.c +++ b/sys/compat/linuxkpi/common/src/linux_dmi.c @@ -82,9 +82,13 @@ for (i = 0; i < nitems(dsi->matches); i++) { if (dsi->matches[i].slot == DMI_NONE) break; - if (dmi_match(dsi->matches[i].slot, - dsi->matches[i].substr) == false) - return (false); + if (dsi->matches[i].exact_match) { + return (dmi_match(dsi->matches[i].slot, + dsi->matches[i].substr)); + } else { + return (strstr(dmi_data[dsi->matches[i].slot], + dsi->matches[i].substr) != NULL); + } } return (true);