From d16a8f80e9dd21d97b10056858a21b7e8fbd8c94 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sat, 4 May 2024 01:37:51 +0200 Subject: [PATCH] Revert "libdm: fix condition" This reverts commit 2a1e200f7af3d4c52afbb4627c8cf87f98baa71e. Breaks some test - more analysis is needed. --- device_mapper/libdm-report.c | 6 ++---- libdm/libdm-report.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/device_mapper/libdm-report.c b/device_mapper/libdm-report.c index 97a5742ad..2dca2513e 100644 --- a/device_mapper/libdm-report.c +++ b/device_mapper/libdm-report.c @@ -2589,8 +2589,7 @@ static int _check_reserved_values_supported(const struct dm_report_field_type fi if (iter->type & DM_REPORT_FIELD_TYPE_MASK) { if (!(iter->type & supported_reserved_types) || ((iter->type & DM_REPORT_FIELD_RESERVED_VALUE_RANGE) && - !(iter->type & (supported_reserved_types_with_range & - ~DM_REPORT_FIELD_RESERVED_VALUE_RANGE)))) { + !(iter->type & supported_reserved_types_with_range))) { log_error(INTERNAL_ERROR "_check_reserved_values_supported: " "global reserved value for type 0x%x not supported", iter->type); @@ -2601,8 +2600,7 @@ static int _check_reserved_values_supported(const struct dm_report_field_type fi field = &fields[field_res->field_num]; if (!(field->flags & supported_reserved_types) || ((iter->type & DM_REPORT_FIELD_RESERVED_VALUE_RANGE) && - !(iter->type & (supported_reserved_types_with_range & - ~DM_REPORT_FIELD_RESERVED_VALUE_RANGE)))) { + !(iter->type & supported_reserved_types_with_range))) { log_error(INTERNAL_ERROR "_check_reserved_values_supported: " "field-specific reserved value of type 0x%x for " "field %s not supported", diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index 32466cdb4..779a10d3f 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -2587,8 +2587,7 @@ static int _check_reserved_values_supported(const struct dm_report_field_type fi if (iter->type & DM_REPORT_FIELD_TYPE_MASK) { if (!(iter->type & supported_reserved_types) || ((iter->type & DM_REPORT_FIELD_RESERVED_VALUE_RANGE) && - !(iter->type & (supported_reserved_types_with_range & - ~DM_REPORT_FIELD_RESERVED_VALUE_RANGE)))) { + !(iter->type & supported_reserved_types_with_range))) { log_error(INTERNAL_ERROR "_check_reserved_values_supported: " "global reserved value for type 0x%x not supported", iter->type); @@ -2599,8 +2598,7 @@ static int _check_reserved_values_supported(const struct dm_report_field_type fi field = &fields[field_res->field_num]; if (!(field->flags & supported_reserved_types) || ((iter->type & DM_REPORT_FIELD_RESERVED_VALUE_RANGE) && - !(iter->type & (supported_reserved_types_with_range & - ~DM_REPORT_FIELD_RESERVED_VALUE_RANGE)))) { + !(iter->type & supported_reserved_types_with_range))) { log_error(INTERNAL_ERROR "_check_reserved_values_supported: " "field-specific reserved value of type 0x%x for " "field %s not supported", -- 2.43.5