From 2c352d7b1ec7af0ecccda653085c5ad16a2179f8 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 7 Jan 2010 14:30:47 +0000 Subject: [PATCH] Show all fields for 'dmsetup info -c -o all'. --- WHATS_NEW_DM | 1 + libdm/libdm-report.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index a48f234d7..0c3530624 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.41 - ==================================== + Update code to show all fields for 'dmsetup info -c -o all'. Return error from dm_tree_deactivate_children(). Return error from dm_tree_suspend_children(). Return error from dm_tree_preload_children() and dm_tree_activate_children(). diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index 6784a11e3..992561487 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -26,6 +26,8 @@ struct dm_report { struct dm_pool *mem; + /* To report all available types */ +#define REPORT_TYPES_ALL UINT32_MAX uint32_t report_types; const char *output_field_name_prefix; const char *field_prefix; @@ -379,7 +381,8 @@ static uint32_t _all_match(struct dm_report *rh, const char *field, size_t flen) _all_match(rh, prefixed_all, strlen(prefixed_all)); } else - return rh->report_types; + return (rh->report_types) + ? rh->report_types : REPORT_TYPES_ALL; } for (t = rh->types; t->data_fn; t++) {