summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorAaron Marcher <me@drkhsh.at>2018-05-01 21:01:25 +0200
committerAaron Marcher <me@drkhsh.at>2018-05-01 21:01:25 +0200
commit8d341ff090125912b131fb4979676fceea36d2ef (patch)
treee3ba6d1b736049d33a366f469fff241c9430d90b /components
parent6db10069ccfebd186f079a02ae7b37ded8bf238a (diff)
Remove battery_power for various reasons
- Battery power cannot be easily gatherable via apm(4) - IMHO it does not represent essential information
Diffstat (limited to 'components')
-rw-r--r--components/battery.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/components/battery.c b/components/battery.c
index 327d576..86ea2a1 100644
--- a/components/battery.c
+++ b/components/battery.c
@@ -21,18 +21,6 @@
}
const char *
- battery_power(const char *bat)
- {
- int watts;
- char path[PATH_MAX];
-
- snprintf(path, sizeof(path), "%s%s%s", "/sys/class/power_supply/",
- bat, "/power_now");
- return (pscanf(path, "%i", &watts) == 1) ?
- bprintf("%d", (watts + 500000) / 1000000) : NULL;
- }
-
- const char *
battery_state(const char *bat)
{
struct {