summaryrefslogtreecommitdiffstats
path: root/libdm/libdm-report.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2010-01-07 14:30:47 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2010-01-07 14:30:47 +0000
commit2c352d7b1ec7af0ecccda653085c5ad16a2179f8 (patch)
tree9cf4a69a7c0c01db49971dc13f80f7d2f92754f2 /libdm/libdm-report.c
parentf760f97a1fce65a03db52b2b98b4065edcb61923 (diff)
downloadlvm2-2c352d7b1ec7af0ecccda653085c5ad16a2179f8.tar.gz
lvm2-2c352d7b1ec7af0ecccda653085c5ad16a2179f8.tar.xz
lvm2-2c352d7b1ec7af0ecccda653085c5ad16a2179f8.zip
Show all fields for 'dmsetup info -c -o all'.
Diffstat (limited to 'libdm/libdm-report.c')
-rw-r--r--libdm/libdm-report.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c
index 6784a11e..99256148 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++) {