rule: fallback to use board information if product information is not set

This commit is contained in:
Yu Watanabe 2022-01-23 12:57:43 +09:00
parent a93306a22e
commit da60d91c99

View file

@ -109,6 +109,9 @@ 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_SYSFS_ATTRIBUTE_MODEL}=="product_version", ENV{ID_MODEL}="$attr{product_version}"
# fallback to board information
ENV{ID_VENDOR}=="", ENV{ID_VENDOR}="$attr{board_vendor}"
ENV{ID_MODEL}=="", ENV{ID_MODEL}="$attr{board_name}"
LABEL="dmi_end"
LABEL="default_end"