mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-20 09:00:03 +01:00
only suppy an id for devices supplying the system
This commit is contained in:
parent
4a15e42c41
commit
d7447437dd
1 changed files with 4 additions and 0 deletions
|
|
@ -548,6 +548,10 @@ devkit_power_source_get_id (DevkitPowerSource *source)
|
||||||
GString *string;
|
GString *string;
|
||||||
gchar *id = NULL;
|
gchar *id = NULL;
|
||||||
|
|
||||||
|
/* only valid for devices supplying the system */
|
||||||
|
if (!source->priv->power_supply)
|
||||||
|
return id;
|
||||||
|
|
||||||
/* only valid for batteries */
|
/* only valid for batteries */
|
||||||
if (source->priv->type != DEVKIT_POWER_TYPE_BATTERY)
|
if (source->priv->type != DEVKIT_POWER_TYPE_BATTERY)
|
||||||
return id;
|
return id;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue