-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement missing miner functions on FreeBSD #2792
Implement missing miner functions on FreeBSD #2792
Conversation
cryptonote::miner::get_system_times(): Fetch the system's total and idle time using sysctl kern.cp_time. cryptonote::miner::get_process_time(): Use the same implementation as Linux and OSX, the times(3) function conforms to POSIX.1 and is available on FreeBSD. cryptonote::miner::on_battery_power(): Try to fetch the battery status using sysctl hw.acpi.acline. If that fails (if ACPI is not enabled on the system), then try querying /dev/apm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, though I'm not sure we want error messages if we fail to probe though, that might spam a bit on machines where it triggers ?
Errors from Errors from |
Level based messages (LOG_PRINT_Lx) are the original code, which was replaced with severity based messages (MERROR, MDEBUG, etc). The latter are prefered, and there is mapping from level based to severity based to avoid a huge pointless patch. LOG_ERROR probably points to MERROR, so is prefered over LOG_PRINT_L0 too in new code. |
I see. So this patch is good to go or requires some adjustments? |
It's fine, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed
Implement missing miner functions on FreeBSD
cryptonote::miner::get_system_times(): Fetch the system's total and
idle time using sysctl kern.cp_time.
cryptonote::miner::get_process_time(): Use the same implementation as
Linux and OSX, the times(3) function conforms to POSIX.1 and is
available on FreeBSD.
cryptonote::miner::on_battery_power(): Try to fetch the battery status
using sysctl hw.acpi.acline. If that fails (if ACPI is not enabled on
the system), then try querying /dev/apm.