From: Zdenek Kabelac Date: Fri, 30 Apr 2010 12:31:32 +0000 (+0000) Subject: Show string with invalid pattern X-Git-Tag: old-v2_02_64~8 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=6ef6b6af406415eae30c9d2df225a4d877e272ff;p=lvm2.git Show string with invalid pattern and start error message with capital letter. --- 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; }