From 6ef6b6af406415eae30c9d2df225a4d877e272ff Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 30 Apr 2010 12:31:32 +0000 Subject: [PATCH] Show string with invalid pattern and start error message with capital letter. --- WHATS_NEW | 1 + lib/filters/filter-regex.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index c73b9cdbf..e15258acb 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.64 - ================================= + Display invalid regex pattern for filter configuration in case of error. Remove no-longer-used arg_ptr_value. Fix -M and --type to use strings not pointers that change on config refresh. Fix lvconvert error message when existing mirrored LV is not found. diff --git a/lib/filters/filter-regex.c b/lib/filters/filter-regex.c index 1d415a42a..c06240215 100644 --- a/lib/filters/filter-regex.c +++ b/lib/filters/filter-regex.c @@ -103,7 +103,7 @@ static int _build_matcher(struct rfilter *rf, struct config_value *val) */ for (v = val; v; v = v->next) { if (v->type != CFG_STRING) { - log_error("filter patterns must be enclosed in quotes"); + log_error("Filter patterns must be enclosed in quotes."); goto out; } @@ -128,7 +128,7 @@ static int _build_matcher(struct rfilter *rf, struct config_value *val) */ for (v = val, i = count - 1; v; v = v->next, i--) if (!_extract_pattern(scratch, v->v.str, regex, rf->accept, i)) { - log_error("invalid filter pattern"); + log_error("Invalid filter pattern \"%s\".", v->v.str); goto out; } -- 2.43.5