From e6b8ecd55e8c93a37d1ef63e95abcff17186b0c3 Mon Sep 17 00:00:00 2001 From: Jure Varlec Date: Thu, 16 Jun 2022 10:55:10 +0200 Subject: [PATCH] Add space to the message printed by errMessage() --- modules/database/src/ioc/as/asCa.c | 2 +- modules/libcom/src/error/errlog.h | 4 +++- modules/libcom/src/osi/os/posix/osdMonotonic.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/database/src/ioc/as/asCa.c b/modules/database/src/ioc/as/asCa.c index d2e9f7591..a250a0f7a 100644 --- a/modules/database/src/ioc/as/asCa.c +++ b/modules/database/src/ioc/as/asCa.c @@ -241,7 +241,7 @@ void asCaStart(void) epicsThreadGetStackSize(epicsThreadStackBig), (EPICSTHREADFUNC)asCaTask,0); if(threadid==0) { - errMessage(0,"asCaStart: taskSpawn Failure\n"); + errMessage(0,"asCaStart: taskSpawn Failure"); } } epicsMutexMustLock(asCaTaskLock); diff --git a/modules/libcom/src/error/errlog.h b/modules/libcom/src/error/errlog.h index 3e001ad09..134980426 100644 --- a/modules/libcom/src/error/errlog.h +++ b/modules/libcom/src/error/errlog.h @@ -73,6 +73,8 @@ LIBCOM_API extern int errVerbose; * the status symbol and string values, and the name of the task which invoked errMessage. * It also prints the name of the source file and the line number from which the call was issued. * + * The message to print should not include a newline as one is added implicitly. + * * The status code used for the 1st argument is: * - 0: Find latest vxWorks or Unix error (errno value). * - -1: Don't report status. @@ -82,7 +84,7 @@ LIBCOM_API extern int errVerbose; * \param PM The message to print */ #define errMessage(S, PM) \ - errPrintf(S, __FILE__, __LINE__, "%s", PM) + errPrintf(S, __FILE__, __LINE__, " %s\n", PM) /** epicsPrintf is an old name for errlog routines */ #define epicsPrintf errlogPrintf diff --git a/modules/libcom/src/osi/os/posix/osdMonotonic.c b/modules/libcom/src/osi/os/posix/osdMonotonic.c index 8135eeacf..045c43a48 100644 --- a/modules/libcom/src/osi/os/posix/osdMonotonic.c +++ b/modules/libcom/src/osi/os/posix/osdMonotonic.c @@ -47,7 +47,7 @@ clockid_t ids[] = { return; } - errMessage(errlogMinor, "Warning: failed to setup monotonic time source\n"); + errMessage(errlogMinor, "Warning: failed to setup monotonic time source"); } epicsUInt64 epicsMonotonicResolution(void)