mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 02:03:37 +08:00
udev/rules,hwdb: filter out mostly meaningless default strings
The filter is generated based on the following results: --- git clone git@github.com:linuxhw/DMI.git cd DMI git grep -h -A2 '^System Information$' | grep 'Manufacturer' | sort | uniq -c | sort -nr | less git grep -h -A2 '^System Information$' | grep 'Product Name' | sort | uniq -c | sort -nr | less --- Closes #24446.
This commit is contained in:
parent
d5c8e5ac1b
commit
0cf2dcf154
@ -1,5 +1,28 @@
|
||||
# This file is part of systemd
|
||||
|
||||
# Filter out mostly meaningless names
|
||||
dmi:*:svnDefaultstring:*
|
||||
dmi:*:svnN/A:*
|
||||
dmi:*:svnO.E.M.:*
|
||||
dmi:*:svnOEM:*
|
||||
dmi:*:svnSystemmanufacturer:*
|
||||
dmi:*:svnSystemManufacturer:*
|
||||
dmi:*:svnTobefilledbyO.E.M.:*
|
||||
dmi:*:svnToBeFilledByO.E.M.:*
|
||||
ID_SYS_VENDOR_IS_RUBBISH=1
|
||||
|
||||
dmi:*:pnDefaultstring:*
|
||||
dmi:*:pnN/A:*
|
||||
dmi:*:pnO.E.M.:*
|
||||
dmi:*:pnOEM:*
|
||||
dmi:*:pnSystemproductname:*
|
||||
dmi:*:pnSystemProductName:*
|
||||
dmi:*:pnSystemname:*
|
||||
dmi:*:pnSystemName:*
|
||||
dmi:*:pnTobefilledbyO.E.M.:*
|
||||
dmi:*:pnToBeFilledByO.E.M.:*
|
||||
ID_PRODUCT_NAME_IS_RUBBISH=1
|
||||
|
||||
# Fix "Lenovo" capitalization in /sys/class/dmi/id/sys_vendor
|
||||
dmi:bvnLENOVO*
|
||||
ID_SYSFS_ATTRIBUTE_MODEL=product_version
|
||||
|
@ -110,8 +110,9 @@ SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK += "ptp_kvm"
|
||||
SUBSYSTEM=="ptp", ATTR{clock_name}=="hyperv", SYMLINK += "ptp_hyperv"
|
||||
|
||||
SUBSYSTEM!="dmi", GOTO="dmi_end"
|
||||
ENV{ID_VENDOR}="$attr{sys_vendor}"
|
||||
ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="|product_name", ENV{ID_MODEL}="$attr{product_name}"
|
||||
ENV{ID_SYS_VENDOR_IS_RUBBISH}!="1", ENV{ID_VENDOR}="$attr{sys_vendor}"
|
||||
ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="", ENV{ID_PRODUCT_NAME_IS_RUBBISH}!="1", ENV{ID_MODEL}="$attr{product_name}"
|
||||
ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="product_name", ENV{ID_MODEL}="$attr{product_name}"
|
||||
ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="product_version", ENV{ID_MODEL}="$attr{product_version}"
|
||||
# fallback to board information
|
||||
ENV{ID_VENDOR}=="", ENV{ID_VENDOR}="$attr{board_vendor}"
|
||||
|
Loading…
Reference in New Issue
Block a user