mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 00:37:46 +00:00
Added message if huge pages was enabled, but reboot required.
This commit is contained in:
parent
15b4244ea8
commit
a2574e1b1b
3 changed files with 10 additions and 3 deletions
|
@ -75,6 +75,11 @@ void applog(int prio, const char *fmt, ...)
|
||||||
prio = LOG_NOTICE;
|
prio = LOG_NOTICE;
|
||||||
color = CL_CYN;
|
color = CL_CYN;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case LOG_GREEN:
|
||||||
|
prio = LOG_NOTICE;
|
||||||
|
color = CL_LGR;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +121,7 @@ void applog_notime(int prio, const char *fmt, ...)
|
||||||
if (opt_colors) {
|
if (opt_colors) {
|
||||||
switch (prio) {
|
switch (prio) {
|
||||||
case LOG_ERR: color = CL_RED; break;
|
case LOG_ERR: color = CL_RED; break;
|
||||||
case LOG_WARNING: color = CL_YLW; break;
|
case LOG_WARNING: color = CL_LYL; break;
|
||||||
case LOG_NOTICE: color = CL_WHT; break;
|
case LOG_NOTICE: color = CL_WHT; break;
|
||||||
case LOG_INFO: color = ""; break;
|
case LOG_INFO: color = ""; break;
|
||||||
case LOG_DEBUG: color = CL_GRY; break;
|
case LOG_DEBUG: color = CL_GRY; break;
|
||||||
|
|
|
@ -30,7 +30,8 @@ enum {
|
||||||
LOG_NOTICE,
|
LOG_NOTICE,
|
||||||
LOG_INFO,
|
LOG_INFO,
|
||||||
LOG_DEBUG,
|
LOG_DEBUG,
|
||||||
LOG_BLUE = 0x10
|
LOG_BLUE = 0x10,
|
||||||
|
LOG_GREEN
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CL_N "\x1B[0m"
|
#define CL_N "\x1B[0m"
|
||||||
|
@ -57,7 +58,7 @@ enum {
|
||||||
#endif
|
#endif
|
||||||
#define CL_LRD "\x1B[01;31m" /* light red */
|
#define CL_LRD "\x1B[01;31m" /* light red */
|
||||||
#define CL_LGR "\x1B[01;32m" /* light green */
|
#define CL_LGR "\x1B[01;32m" /* light green */
|
||||||
#define CL_YL2 "\x1B[01;33m" /* yellow */
|
#define CL_LYL "\x1B[01;33m" /* light yellow */
|
||||||
#define CL_LBL "\x1B[01;34m" /* light blue */
|
#define CL_LBL "\x1B[01;34m" /* light blue */
|
||||||
#define CL_LMA "\x1B[01;35m" /* light magenta */
|
#define CL_LMA "\x1B[01;35m" /* light magenta */
|
||||||
#define CL_LCY "\x1B[01;36m" /* light cyan */
|
#define CL_LCY "\x1B[01;36m" /* light cyan */
|
||||||
|
|
|
@ -122,6 +122,7 @@ static BOOL ObtainLockPagesPrivilege() {
|
||||||
LSA_UNICODE_STRING str = StringToLsaUnicodeString(_T(SE_LOCK_MEMORY_NAME));
|
LSA_UNICODE_STRING str = StringToLsaUnicodeString(_T(SE_LOCK_MEMORY_NAME));
|
||||||
|
|
||||||
if (LsaAddAccountRights(handle, user->User.Sid, &str, 1) == 0) {
|
if (LsaAddAccountRights(handle, user->User.Sid, &str, 1) == 0) {
|
||||||
|
applog_notime(LOG_WARNING, "Huge pages support was successfully enabled, but reboot required to use it");
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue