summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2021-03-09 14:30:49 +0000
committerAlastair Poole <netstar@gmail.com>2021-03-09 14:30:49 +0000
commit3e1b41ab44c68135f7b049fb22a9c484afe986aa (patch)
treeeb49b3f75301d9d260bd3e2fbd608be19897e826
parente4d187602b527d10d9a7f5f037db24a25cf064d9 (diff)
downloadenlightenment-3e1b41ab44c68135f7b049fb22a9c484afe986aa.tar.gz
battery: OpenBSD > 1 battery.
-rw-r--r--src/modules/battery/e_mod_sysctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/battery/e_mod_sysctl.c b/src/modules/battery/e_mod_sysctl.c
index b199d4ad68..738b6ef3c0 100644
--- a/src/modules/battery/e_mod_sysctl.c
+++ b/src/modules/battery/e_mod_sysctl.c
@@ -49,11 +49,11 @@ _battery_sysctl_start(void)
break;
}
- if (!strcmp("acpibat0", snsrdev.xname))
+ if (!strncmp("acpibat", snsrdev.xname, 7))
{
if (!(bat = E_NEW(Battery, 1)))
return 0;
- bat->udi = eina_stringshare_add("acpibat0"),
+ bat->udi = eina_stringshare_add(snsrdev.xname);
bat->mib = malloc(sizeof(int) * 5);
if (!bat->mib) return 0;
bat->mib[0] = mib[0];