diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-10-12 15:28:13 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2013-10-14 10:26:53 +0200 |
commit | cb759a05c85a0a81b6813ed53278b4cfc43ce778 (patch) | |
tree | a06617daa6f7cab0929b7cceeae95e711249630a | |
parent | e385c570d4084db12005f092b91fd44eebb11874 (diff) |
linux: Don't print a warning if the status sysfs attr is missing
This is the case for some devices like the Wacom wireless (Bluetooth)
tablets, and shouldn't produce a warning.
-rw-r--r-- | src/linux/up-device-supply.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c index ef40e06..8020277 100644 --- a/src/linux/up-device-supply.c +++ b/src/linux/up-device-supply.c @@ -635,7 +635,8 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply) state = UP_DEVICE_STATE_FULLY_CHARGED; else if (g_ascii_strcasecmp (status, "empty") == 0) state = UP_DEVICE_STATE_EMPTY; - else if (g_ascii_strcasecmp (status, "unknown") == 0) + else if (g_ascii_strcasecmp (status, "unknown") == 0 || + *status == '\0') state = UP_DEVICE_STATE_UNKNOWN; else if (g_ascii_strcasecmp (status, "not charging") == 0) state = UP_DEVICE_STATE_PENDING_CHARGE; |