Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102667897
D35395.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35395.diff
View Options
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);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 2:42 PM (21 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14660179
Default Alt Text
D35395.diff (1 KB)
Attached To
Mode
D35395: linuxkpi/dmi: don't match exactly on DMI_MATCH
Attached
Detach File
Event Timeline
Log In to Comment