mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 10:29:47 +00:00
trivial: Fix the vendor to battery threshold mapping
I broke this when optimizing fu_context_lookup_quirk_by_id() to only take a GUID. Mea culpa. Fixes https://github.com/fwupd/fwupd/issues/4250
This commit is contained in:
parent
783e2e0448
commit
2633b68cd8
@ -6906,8 +6906,9 @@ fu_engine_context_set_battery_threshold(FuContext *ctx)
|
||||
|
||||
vendor = fu_context_get_hwid_replace_value(ctx, FU_HWIDS_KEY_MANUFACTURER, NULL);
|
||||
if (vendor != NULL) {
|
||||
g_autofree gchar *vendor_guid = fwupd_guid_hash_string(vendor);
|
||||
battery_str = g_strdup(
|
||||
fu_context_lookup_quirk_by_id(ctx, vendor, FU_QUIRKS_BATTERY_THRESHOLD));
|
||||
fu_context_lookup_quirk_by_id(ctx, vendor_guid, FU_QUIRKS_BATTERY_THRESHOLD));
|
||||
}
|
||||
if (battery_str == NULL)
|
||||
minimum_battery = MINIMUM_BATTERY_PERCENTAGE_FALLBACK;
|
||||
|
Loading…
Reference in New Issue
Block a user