]> sourceware.org Git - lvm2.git/commitdiff
report: fix regression while selecting string fields using synonyms
authorPeter Rajnoha <prajnoha@redhat.com>
Thu, 2 Jul 2015 09:31:54 +0000 (11:31 +0200)
committerPeter Rajnoha <prajnoha@redhat.com>
Thu, 2 Jul 2015 09:31:54 +0000 (11:31 +0200)
$ 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

WHATS_NEW
libdm/libdm-report.c

index 1b5b0978f3741f47a75582419f9a2564f2f49625..6c822c49e8317c4481b97ddf8e6fb20ac9ed88cf 100644 (file)
--- 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.
 
index 18710d32a7b9c156a701365389f085667d94ad97..3f68a9e52e6b89a53e10011b6fbfcaceeda88779 100644 (file)
@@ -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);
This page took 0.051065 seconds and 5 git commands to generate.