diff options
author | Guillaume LE VAILLANT <glv@posteo.net> | 2017-09-08 11:07:56 +0200 |
---|---|---|
committer | Guillaume LE VAILLANT <glv@posteo.net> | 2017-09-08 11:07:56 +0200 |
commit | 20256b7c0499b07c4f2ad45901bcde7d68893345 (patch) | |
tree | 184fb3b96eaf8475467852ffb7ffb891bf74e191 /src | |
parent | Merge pull request #2384 (diff) | |
download | monero-20256b7c0499b07c4f2ad45901bcde7d68893345.tar.xz |
Fix AC power supply detection on Linux
The /sys/class/power_supply/*/present file usually does not exist for
AC power supplies.
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_basic/miner.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index 3c5811d61..b620e3426 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -858,19 +858,6 @@ namespace cryptonote const boost::filesystem::path& power_supply_path = iter->path(); if (boost::filesystem::is_directory(power_supply_path)) { - std::ifstream power_supply_present_stream((power_supply_path / "present").string()); - if (power_supply_present_stream.fail()) - { - LOG_PRINT_L0("Unable to read from " << power_supply_path << " to check if power supply present"); - continue; - } - - if (power_supply_present_stream.get() != '1') - { - LOG_PRINT_L4("Power supply not present at " << power_supply_path); - continue; - } - boost::filesystem::path power_supply_type_path = power_supply_path / "type"; if (boost::filesystem::is_regular_file(power_supply_type_path)) { |