mirror of
https://github.com/xmrig/xmrig.git
synced 2024-09-29 05:51:06 +00:00
Don't print empty memory slots if the total count above 8.
This commit is contained in:
parent
e6d4921e21
commit
65fe26dc6c
1 changed files with 3 additions and 3 deletions
|
@ -146,7 +146,7 @@ static void print_memory(const Config *config)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool vm = Cpu::info()->isVM();
|
const bool printEmpty = reader.memory().size() <= 8;
|
||||||
|
|
||||||
for (const auto &memory : reader.memory()) {
|
for (const auto &memory : reader.memory()) {
|
||||||
if (!memory.isValid()) {
|
if (!memory.isValid()) {
|
||||||
|
@ -157,12 +157,12 @@ static void print_memory(const Config *config)
|
||||||
Log::print(WHITE_BOLD(" %-13s") "%s: " CYAN_BOLD("%" PRIu64) CYAN(" GB ") WHITE_BOLD("%s @ %" PRIu64 " MHz ") BLACK_BOLD("%s"),
|
Log::print(WHITE_BOLD(" %-13s") "%s: " CYAN_BOLD("%" PRIu64) CYAN(" GB ") WHITE_BOLD("%s @ %" PRIu64 " MHz ") BLACK_BOLD("%s"),
|
||||||
"", memory.slot().data(), memory.size() / oneGiB, memory.type(), memory.speed() / 1000000ULL, memory.product().data());
|
"", memory.slot().data(), memory.size() / oneGiB, memory.type(), memory.speed() / 1000000ULL, memory.product().data());
|
||||||
}
|
}
|
||||||
else if (!vm) {
|
else if (printEmpty) {
|
||||||
Log::print(WHITE_BOLD(" %-13s") "%s: " BLACK_BOLD("<empty>"), "", memory.slot().data());
|
Log::print(WHITE_BOLD(" %-13s") "%s: " BLACK_BOLD("<empty>"), "", memory.slot().data());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto &board = vm ? reader.system() : reader.board();
|
const auto &board = Cpu::info()->isVM() ? reader.system() : reader.board();
|
||||||
|
|
||||||
if (board.isValid()) {
|
if (board.isValid()) {
|
||||||
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") WHITE_BOLD("%s") " - " WHITE_BOLD("%s"), "MOTHERBOARD", board.vendor().data(), board.product().data());
|
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") WHITE_BOLD("%s") " - " WHITE_BOLD("%s"), "MOTHERBOARD", board.vendor().data(), board.product().data());
|
||||||
|
|
Loading…
Reference in a new issue