From: Eric Leblond Date: Thu, 3 Oct 2013 11:50:09 +0000 (+0200) Subject: suricata: info message after log init X-Git-Tag: suricata-2.0beta2~238 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a4600539db9394f19d8cd9cc62b9d1b9bfa2aaa;p=thirdparty%2Fsuricata.git suricata: info message after log init This patch moves version display after log init so we can have an homogeneous display. --- diff --git a/src/suricata.c b/src/suricata.c index 1c86ca17ac..c3ae657106 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -918,6 +918,18 @@ static TmEcode PrintVersion() return TM_ECODE_OK; } +static TmEcode SCPrintVersion() +{ +#ifdef REVISION + SCLogNotice("This is %s version %s (rev %s)", PROG_NAME, PROG_VER, xstr(REVISION)); +#elif defined RELEASE + SCLogNotice("This is %s version %s RELEASE", PROG_NAME, PROG_VER); +#else + SCLogNotice("This is %s version %s", PROG_NAME, PROG_VER); +#endif + return TM_ECODE_OK; +} + static void SCSetStartTime(SCInstance *suri) { memset(&suri->start_time, 0, sizeof(suri->start_time)); @@ -1856,10 +1868,6 @@ int main(int argc, char **argv) if (suri.run_mode == RUNMODE_UNITTEST) return RunUnittests(0, suri.regex_arg); - PrintVersion(); - - UtilCpuPrintSummary(); - #ifdef __SC_CUDA_SUPPORT__ /* Init the CUDA environment */ SCCudaInitCudaEnvironment(); @@ -1888,6 +1896,10 @@ int main(int argc, char **argv) * logging module. */ SCLogLoadConfig(suri.daemon); + SCPrintVersion(); + + UtilCpuPrintSummary(); + /* load the pattern matchers */ MpmTableSetup(); #ifdef __SC_CUDA_SUPPORT__