Add commandline utility to resize buffer after being initialised

This commit is contained in:
Simon Rose authored and Dirk Zimoch committed 2026-10-13 10:21:35 +02:00
1 parent 53a3e4b694
commit d3ff8dca3f
3 files changed
+55

No files matched your search

+17
View File
@@ -290,6 +290,22 @@ static void errlogInit2CallFunc(const iocshArgBuf *args)
errlogInit2(args[0].ival, args[1].ival);
}
/* errlogBufResize */
static const iocshArg errlogBufResizeArg0 = { "bufSize",iocshArgInt};
static const iocshArg errlogBufResizeArg1 = { "maxMsgSize",iocshArgInt};
static const iocshArg * const errlogBufResizeArgs[] =
{&errlogBufResizeArg0, &errlogBufResizeArg1};
static const iocshFuncDef errlogBufResizeFuncDef = {
"errlogBufResize", 2, errlogBufResizeArgs,
"Reinitialize error log client buffer size and maximum message size\n"
" bufSize - size of circular buffer (default = 1280 bytes)\n"
" maxMsgSize - maximum size of error message (default = 256 bytes)\n"
};
static void errlogBufResizeCallFunc(const iocshArgBuf *args)
{
errlogBufResize(args[0].ival, args[1].ival);
}
/* errlog */
IOCSH_STATIC_FUNC void errlog(char *message)
{
@@ -504,6 +520,7 @@ void epicsStdCall libComRegister(void)
iocshRegister(&eltcFuncDef, eltcCallFunc);
iocshRegister(&errlogInitFuncDef,errlogInitCallFunc);
iocshRegister(&errlogInit2FuncDef,errlogInit2CallFunc);
iocshRegister(&errlogBufResizeFuncDef,errlogBufResizeCallFunc);
iocshRegister(&errlogFuncDef, errlogCallFunc);
iocshRegister(&iocLogPrefixFuncDef, iocLogPrefixCallFunc);