From: Peter Rajnoha Date: Thu, 2 Jul 2015 09:31:54 +0000 (+0200) Subject: report: fix regression while selecting string fields using synonyms X-Git-Tag: v2_02_124~13 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=454782f;p=lvm2.git report: fix regression while selecting string fields using synonyms $ lvs -o name,cache_policy vg/lvol0 LV Cache Policy lvol0 Before this patch: $ lvs -o name,cache_policy -S 'cache_policy=undefined' vg/lvol0 (no match) With this patch applied: $ lvs -o name,cache_policy -S 'cache_policy=undefined' vg/lvol0 LV Cache Policy lvol0 --- diff --git a/WHATS_NEW b/WHATS_NEW index 1b5b0978f..6c822c49e 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.124 - ================================= + Fix regression in select to match string fields if using synonyms (2.02.123). Fix regression when printing more lv names via display_lvname (2.02.122). Add missing error logging to unlock_vg and sync_local_dev_names callers. diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index 18710d32a..3f68a9e52 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -1505,9 +1505,9 @@ static int _cmp_field_string(struct dm_report *rh __attribute__((unused)), switch (fs->flags & FLD_CMP_MASK) { case FLD_CMP_EQUAL: - return _check_value_is_strictly_reserved(rh, field_num, DM_REPORT_FIELD_TYPE_STRING, val, fs) ? 0 : !strcmp(val, sel); + return !strcmp(val, sel); case FLD_CMP_NOT|FLD_CMP_EQUAL: - return _check_value_is_strictly_reserved(rh, field_num, DM_REPORT_FIELD_TYPE_STRING, val, fs) ? 0 : strcmp(val, sel); + return strcmp(val, sel); default: log_error(INTERNAL_ERROR "_cmp_field_string: unsupported string " "comparison type for selection field %s", field_id);