Merge pull request #1937

64377c90 Add other possible paths of AC power status file on Linux (Guillaume LE VAILLANT)
This commit is contained in:
Riccardo Spagni 2017-04-11 00:15:24 +02:00
commit 2037083b5f
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -812,7 +812,9 @@ namespace cryptonote
const std::string POWER_SUPPLY_STATUS_PATHS[] = const std::string POWER_SUPPLY_STATUS_PATHS[] =
{ {
"/sys/class/power_supply/ACAD/online", "/sys/class/power_supply/ACAD/online",
"/sys/class/power_supply/AC/online" "/sys/class/power_supply/AC/online",
"/sys/class/power_supply/AC0/online",
"/sys/class/power_supply/ADP0/online"
}; };
for(const std::string& path : POWER_SUPPLY_STATUS_PATHS) for(const std::string& path : POWER_SUPPLY_STATUS_PATHS)