Skip to content

Commit

Permalink
tlp-stat -s: show proper ThinkPad model string with Libreboot
Browse files Browse the repository at this point in the history
Reference:
* #679
  • Loading branch information
linrunner committed Feb 25, 2023
1 parent 929d212 commit 0aac593
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
when DEVICES_TO_ENABLE/DISABLE_ON_STARTUP is actually unconfigured
- Show EC firmware version
- Show system suspend mode
- Show proper ThinkPad model string with Libreboot (Issue #679)
PCI(e) devices:
- RUNTIME_PM_ENABLE/DISABLE: apply even when RUNTIME_PM_ON_AC/BAT
is disabled (Issue #614)
Expand Down
10 changes: 8 additions & 2 deletions tlp-stat.in
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,18 @@ if [ "$show_system" = "1" ] || [ "$show_all" = "1" ] ; then
# --- show system info
# simulate arbitrary model
if [ -z "$X_SIMULATE_MODEL" ]; then
model="$(read_dmi product_version)"
product_version="$(read_dmi product_version)"
product_name="$(read_dmi product_name)"
if printf '%s' "$product_name" | grep -E -q 'Think[Pp]ad'; then
model="$product_name"
else
model="$product_version $product_name"
fi
else
model="$X_SIMULATE_MODEL"
fi
echo "+++ System Info"
echo "System = $(read_dmi sys_vendor) $model $(read_dmi product_name)"
echo "System = $(read_dmi sys_vendor) $model"
echo "BIOS = $(read_dmi bios_version)"
ecfw="$(read_dmi ec_firmware_release)" && printf "EC Firmware = %s\n" "$ecfw"

Expand Down

0 comments on commit 0aac593

Please sign in to comment.