mirror of
https://gitlab.freedesktop.org/upower/power-profiles-daemon.git
synced 2026-05-07 14:18:35 +02:00
trickle-charge: Don't change charge type on system chargers
We're supposed to only change the charge type of devices attached to us. Closes: #85
This commit is contained in:
parent
92cf0278b0
commit
f48f6ca28d
1 changed files with 3 additions and 0 deletions
|
|
@ -56,6 +56,9 @@ set_charge_type (PpdActionTrickleCharge *action,
|
|||
GUdevDevice *dev = l->data;
|
||||
const char *value;
|
||||
|
||||
if (g_strcmp0 (g_udev_device_get_sysfs_attr (dev, "scope"), "Device") != 0)
|
||||
continue;
|
||||
|
||||
value = g_udev_device_get_sysfs_attr_uncached (dev, CHARGE_TYPE_SYSFS_NAME);
|
||||
if (!value)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue