colorize more errors/warnings

This commit is contained in:
Michael Davidsaver
2025-09-20 09:36:20 -05:00
parent edd99a903b
commit 7444936a22
2 changed files with 6 additions and 5 deletions

View File

@@ -16,6 +16,7 @@
#include <readline/readline.h>
#include <readline/history.h>
#include "errlog.h"
#include "epicsExit.h"
#include "envDefs.h"
#include "epicsReadlinePvt.h"
@@ -78,7 +79,7 @@ osdReadline (const char *prompt, struct readlineContext *context)
line = malloc(linesize);
if (line == NULL) {
printf("Out of memory!\n");
fprintf(stderr, ERL_ERROR " osdReadline() Out of memory!\n");
return NULL;
}
if (prompt) {
@@ -98,7 +99,7 @@ osdReadline (const char *prompt, struct readlineContext *context)
linesize = linelen + 50;
cp = (char *)realloc(line, linesize);
if (cp == NULL) {
printf ("Out of memory!\n");
fprintf(stderr, ERL_ERROR " osdReadline() Out of memory!\n");
free(line);
line = NULL;
break;

View File

@@ -473,16 +473,16 @@ void epicsThreadRealtimeLock(void)
#ifdef __linux__
case ENOMEM:
fprintf(stderr, "epicsThreadRealtimeLock "
"Warning: unable to lock memory. RLIMIT_MEMLOCK is too small or missing CAP_IPC_LOCK\n");
ERL_WARNING ": unable to lock memory. RLIMIT_MEMLOCK is too small or missing CAP_IPC_LOCK\n");
break;
case EPERM:
fprintf(stderr, "epicsThreadRealtimeLock "
"Warning: unable to lock memory. missing CAP_IPC_LOCK\n");
ERL_WARNING ": unable to lock memory. missing CAP_IPC_LOCK\n");
break;
#endif
default:
fprintf(stderr, "epicsThreadRealtimeLock "
"Warning: Unable to lock the virtual address space.\n"
ERL_WARNING ": Unable to lock the virtual address space.\n"
"VM page faults may harm real-time performance. errno=%d\n",
err);
}