Commit b064d501 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files
parent ff78a1bf
......@@ -110,16 +110,13 @@ static ACPresence procAcpiCheck() {
char statePath[50];
xSnprintf((char *) statePath, sizeof statePath, "%s/%s/state", power_supplyPath, entryName);
FILE* file = fopen(statePath, "r");
if (!file) {
isOn = AC_ERROR;
continue;
}
char* line = String_readLine(file);
if (!line) continue;
fclose(file);
if (!line) continue;
const char *isOnline = String_getToken(line, 2);
free(line);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment