upower: Handle Linux power supplies not exporting a present property
From: Heiko Stuebner <heiko@...> Date: Sun, 27 Nov 2011 20:12:13 +0100
According to Anton Vorontsov (Linux power supply maintainer) power supplies should not export a present property when they are not hotpluggable and users of the properties should handle supplies without present-property as always present. This patch implements this feature using an additional sysfs_file_exists call before sysfs_get_bool.
src/linux/up-device-supply.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
- 5 lines added
- 1 lines removed