summaryrefslogtreecommitdiffstats
path: root/linux/Battery.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/Battery.c')
-rw-r--r--linux/Battery.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/Battery.c b/linux/Battery.c
index aedacabc..7b9e79a1 100644
--- a/linux/Battery.c
+++ b/linux/Battery.c
@@ -78,7 +78,7 @@ static unsigned long int parseBatInfo(const char *fileName, const unsigned short
const unsigned long int foundNum = atoi(foundNumStr);
free(foundNumStr);
free(line);
-
+
total += foundNum;
}
@@ -175,7 +175,7 @@ static inline ssize_t xread(int fd, void *buf, size_t count) {
}
static void Battery_getSysData(double* level, ACPresence* isOnAC) {
-
+
*level = 0;
*isOnAC = AC_ERROR;
@@ -194,7 +194,7 @@ static void Battery_getSysData(double* level, ACPresence* isOnAC) {
const char filePath[50];
if (entryName[0] == 'B' && entryName[1] == 'A' && entryName[2] == 'T') {
-
+
xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/uevent", entryName);
int fd = open(filePath, O_RDONLY);
if (fd == -1) {
@@ -247,7 +247,7 @@ static void Battery_getSysData(double* level, ACPresence* isOnAC) {
if (*isOnAC != AC_ERROR) {
continue;
}
-
+
xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/online", entryName);
int fd = open(filePath, O_RDONLY);
if (fd == -1) {