From 604542081221a95c8904dcdde9d599b30c87c55a Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 10 Jun 2016 09:56:23 +0200 Subject: [PATCH] detect: reduce verbosity, don't warn on empty files --- src/detect.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/detect.c b/src/detect.c index bf95d784d1..141e819105 100644 --- a/src/detect.c +++ b/src/detect.c @@ -389,7 +389,10 @@ static int ProcessSigFiles(DetectEngineCtx *de_ctx, char *pattern, for (size_t i = 0; i < (size_t)files.gl_pathc; i++) { char *fname = files.gl_pathv[i]; - SCLogInfo("Loading rule file: %s", fname); + if (strcmp("/dev/null", fname) == 0) + continue; + + SCLogConfig("Loading rule file: %s", fname); r = DetectLoadSigFile(de_ctx, fname, good_sigs, bad_sigs); if (r < 0) { ++(st->bad_files); @@ -397,11 +400,6 @@ static int ProcessSigFiles(DetectEngineCtx *de_ctx, char *pattern, ++(st->total_files); - if (*good_sigs == 0) { - SCLogWarning(SC_ERR_NO_RULES, - "No rules loaded from %s", fname); - } - st->good_sigs_total += *good_sigs; st->bad_sigs_total += *bad_sigs; } @@ -479,11 +477,7 @@ int SigLoadSignatures(DetectEngineCtx *de_ctx, char *sig_file, int sig_file_excl } if (good_sigs == 0) { - SCLogError(SC_ERR_NO_RULES, "No rules loaded from %s", sig_file); - - if (de_ctx->failure_fatal == 1) { - exit(EXIT_FAILURE); - } + SCLogConfig("No rules loaded from %s", sig_file); } } -- 2.47.2