openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/rsyslog/8.1903.0-r0/rsyslog-8.1903.0/runtime/rsconf.c
static rsRetVal loadBuildInModules(void)
{
    DEFiRet;

    CHKiRet(
        regBuildInModule(modInitFile, UCHAR_CONSTANT("builtin:omfile"), NULL));
    CHKiRet(
        regBuildInModule(modInitPipe, UCHAR_CONSTANT("builtin:ompipe"), NULL));
    CHKiRet(
        regBuildInModule(modInitShell, UCHAR_CONSTANT("builtin-shell"), NULL));
    CHKiRet(regBuildInModule(modInitDiscard,
                             UCHAR_CONSTANT("builtin:omdiscard"), NULL));
#ifdef SYSLOG_INET
    CHKiRet(
        regBuildInModule(modInitFwd, UCHAR_CONSTANT("builtin:omfwd"), NULL));
#endif

    /* dirty, but this must be for the time being: the usrmsg module must always
     * be loaded as last module. This is because it processes any type of action
     * selector. If we load it before other modules, these others will never
     * have a chance of working with the config file. We may change that
     * implementation so that a user name must start with an alnum, that would
     * definitely help (but would it break backwards compatibility?). *
     * rgerhards, 2007-07-23 User names now must begin with: [a-zA-Z0-9_.]
     */
    CHKiRet(regBuildInModule(modInitUsrMsg, (uchar*)"builtin:omusrmsg", NULL));

    /* load build-in parser modules */
    CHKiRet(regBuildInModule(modInitpmrfc5424,
                             UCHAR_CONSTANT("builtin:pmrfc5424"), NULL));
    CHKiRet(regBuildInModule(modInitpmrfc3164,
                             UCHAR_CONSTANT("builtin:pmrfc3164"), NULL));

    /* and set default parser modules. Order is *very* important, legacy
     * (3164) parser needs to go last! */
    CHKiRet(parser.AddDfltParser(UCHAR_CONSTANT("rsyslog.rfc5424")));
    CHKiRet(parser.AddDfltParser(UCHAR_CONSTANT("rsyslog.rfc3164")));

    /* load build-in strgen modules */
    CHKiRet(regBuildInModule(modInitsmfile, UCHAR_CONSTANT("builtin:smfile"),
                             NULL));
    CHKiRet(regBuildInModule(modInitsmtradfile,
                             UCHAR_CONSTANT("builtin:smtradfile"), NULL));
    CHKiRet(
        regBuildInModule(modInitsmfwd, UCHAR_CONSTANT("builtin:smfwd"), NULL));
    CHKiRet(regBuildInModule(modInitsmtradfwd,
                             UCHAR_CONSTANT("builtin:smtradfwd"), NULL));

finalize_it:
    if (iRet != RS_RET_OK)
    {
        /* we need to do fprintf, as we do not yet have an error reporting
         * system in place.
         */
        fprintf(stderr,
                "fatal error: could not activate built-in modules. Error code "
                "%d.\n",
                iRet);
    }
    RETiRet;
}
/* load build-in modules
 * very first version begun on 2007-07-23 by rgerhards
 */
load build-in modules
very first version begun on 2007-07-23 by rgerhards
load build - in modules very first version begun on 2007 - 07 - 23 by rgerhards
static rsRetVal loadBuildInModules(void)
{
    DEFiRet;
    CHKiRet(
        regBuildInModule(modInitFile, UCHAR_CONSTANT("builtin:omfile"), NULL));
    CHKiRet(
        regBuildInModule(modInitPipe, UCHAR_CONSTANT("builtin:ompipe"), NULL));
    CHKiRet(
        regBuildInModule(modInitShell, UCHAR_CONSTANT("builtin-shell"), NULL));
    CHKiRet(regBuildInModule(modInitDiscard,
                             UCHAR_CONSTANT("builtin:omdiscard"), NULL));
#ifdef SYSLOG_INET
    CHKiRet(
        regBuildInModule(modInitFwd, UCHAR_CONSTANT("builtin:omfwd"), NULL));
#endif
    CHKiRet(regBuildInModule(modInitUsrMsg, (uchar*)"builtin:omusrmsg", NULL));
    CHKiRet(regBuildInModule(modInitpmrfc5424,
                             UCHAR_CONSTANT("builtin:pmrfc5424"), NULL));
    CHKiRet(regBuildInModule(modInitpmrfc3164,
                             UCHAR_CONSTANT("builtin:pmrfc3164"), NULL));
    CHKiRet(parser.AddDfltParser(UCHAR_CONSTANT("rsyslog.rfc5424")));
    CHKiRet(parser.AddDfltParser(UCHAR_CONSTANT("rsyslog.rfc3164")));
    CHKiRet(regBuildInModule(modInitsmfile, UCHAR_CONSTANT("builtin:smfile"),
                             NULL));
    CHKiRet(regBuildInModule(modInitsmtradfile,
                             UCHAR_CONSTANT("builtin:smtradfile"), NULL));
    CHKiRet(
        regBuildInModule(modInitsmfwd, UCHAR_CONSTANT("builtin:smfwd"), NULL));
    CHKiRet(regBuildInModule(modInitsmtradfwd,
                             UCHAR_CONSTANT("builtin:smtradfwd"), NULL));
finalize_it:
    if (iRet != RS_RET_OK)
    {
        fprintf(stderr,
                "fatal error: could not activate built-in modules. Error code "
                "%d.\n",
                iRet);
    }
    RETiRet;
}
static rsRetVal loadBuildInModules ( void ) { DEFiRet ; CHKiRet ( regBuildInModule ( modInitFile , UCHAR_CONSTANT ( " " ) , NULL ) ) ; CHKiRet ( regBuildInModule ( modInitPipe , UCHAR_CONSTANT ( " " ) , NULL ) ) ; CHKiRet ( regBuildInModule ( modInitShell , UCHAR_CONSTANT ( " " ) , NULL ) ) ; CHKiRet ( regBuildInModule ( modInitDiscard , UCHAR_CONSTANT ( " " ) , NULL ) ) ; #ifdef SYSLOG_INET CHKiRet ( regBuildInModule ( modInitFwd , UCHAR_CONSTANT ( " " ) , NULL ) ) ; #endif CHKiRet ( regBuildInModule ( modInitUsrMsg , ( uchar * ) " " , NULL ) ) ; CHKiRet ( regBuildInModule ( modInitpmrfc5424 , UCHAR_CONSTANT ( " " ) , NULL ) ) ; CHKiRet ( regBuildInModule ( modInitpmrfc3164 , UCHAR_CONSTANT ( " " ) , NULL ) ) ; CHKiRet ( parser . AddDfltParser ( UCHAR_CONSTANT ( " " ) ) ) ; CHKiRet ( parser . AddDfltParser ( UCHAR_CONSTANT ( " " ) ) ) ; CHKiRet ( regBuildInModule ( modInitsmfile , UCHAR_CONSTANT ( " " ) , NULL ) ) ; CHKiRet ( regBuildInModule ( modInitsmtradfile , UCHAR_CONSTANT ( " " ) , NULL ) ) ; CHKiRet ( regBuildInModule ( modInitsmfwd , UCHAR_CONSTANT ( " " ) , NULL ) ) ; CHKiRet ( regBuildInModule ( modInitsmtradfwd , UCHAR_CONSTANT ( " " ) , NULL ) ) ; finalize_it : if ( iRet != RS_RET_OK ) { fprintf ( stderr , " " " \n " , iRet ) ; } RETiRet ; }
load build-in modules
 very first version begun on 2007-07-23 by rgerhards
load build - in modules very first version begun on 2007 - 07 - 23 by rgerhards
/* dirty, but this must be for the time being: the usrmsg module must always
     * be loaded as last module. This is because it processes any type of action
     * selector. If we load it before other modules, these others will never
     * have a chance of working with the config file. We may change that
     * implementation so that a user name must start with an alnum, that would
     * definitely help (but would it break backwards compatibility?). *
     * rgerhards, 2007-07-23 User names now must begin with: [a-zA-Z0-9_.]
     */ /* load build-in parser modules */ /* and set default parser modules. Order is *very* important, legacy
     * (3164) parser needs to go last! */ /* load build-in strgen modules */ /* we need to do fprintf, as we do not yet have an error reporting
         * system in place.
         */