summaryrefslogtreecommitdiffstats
path: root/dragonflybsd
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-11-25 12:46:00 +0100
committerChristian Göttsche <cgzones@googlemail.com>2020-11-25 12:47:07 +0100
commit601ad61e7ddd5a79a0c650ff617b617470fafe07 (patch)
tree03734ee31c6dac9009cefe3286beaebbab43f7b6 /dragonflybsd
parenta3221f367779288090715f4098d9a874cd113ad3 (diff)
Unify naming of first argument of Platform_getBattery
Use percent throughout
Diffstat (limited to 'dragonflybsd')
-rw-r--r--dragonflybsd/Platform.c6
-rw-r--r--dragonflybsd/Platform.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/dragonflybsd/Platform.c b/dragonflybsd/Platform.c
index 6ca576fe..40a73487 100644
--- a/dragonflybsd/Platform.c
+++ b/dragonflybsd/Platform.c
@@ -244,13 +244,13 @@ bool Platform_getNetworkIO(unsigned long int* bytesReceived,
return false;
}
-void Platform_getBattery(double* level, ACPresence* isOnAC) {
+void Platform_getBattery(double* percent, ACPresence* isOnAC) {
int life;
size_t life_len = sizeof(life);
if (sysctlbyname("hw.acpi.battery.life", &life, &life_len, NULL, 0) == -1)
- *level = NAN;
+ *percent = NAN;
else
- *level = life;
+ *percent = life;
int acline;
size_t acline_len = sizeof(acline);
diff --git a/dragonflybsd/Platform.h b/dragonflybsd/Platform.h
index a05eb641..5456539e 100644
--- a/dragonflybsd/Platform.h
+++ b/dragonflybsd/Platform.h
@@ -60,6 +60,6 @@ bool Platform_getNetworkIO(unsigned long int* bytesReceived,
unsigned long int* bytesTransmitted,
unsigned long int* packetsTransmitted);
-void Platform_getBattery(double* level, ACPresence* isOnAC);
+void Platform_getBattery(double* percent, ACPresence* isOnAC);
#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy