]> sourceware.org Git - lvm2.git/commit
dmstats: make 'dmstats list' use common report infrastructure
authorBryn M. Reeves <bmr@redhat.com>
Thu, 13 Aug 2015 22:03:46 +0000 (23:03 +0100)
committerBryn M. Reeves <bmr@redhat.com>
Fri, 14 Aug 2015 12:43:12 +0000 (13:43 +0100)
commite6724f0303b8dee0806ac799f0035d9f928441fc
tree63171276f88f16fd3e0661a34a249aef80e56bea
parent37dd26e322bc2fc3fa0fd7dd85d1972b08fca36c
dmstats: make 'dmstats list' use common report infrastructure

Unlike 'info -c' and 'stats report' the 'dmstats list' subcommand
does its own report processing. This complicates the handling of
the DR_STATS and DR_STATS_META fields and leads to inconsistent
behaviour between the different commands. In particular it causes
'stats list' to segfault when using 'all' field options:

Segmentation fault (core dumped)

Delete _stats_list() entirely and adapt _stats_report so that it
can correctly format a DR_STATS_META-only report request.

This requires passing the subcommand into _report_init() where it
is used in addition to the command name to select the default set
of report fields for the 'list' and 'report' stats subcommands.

With this change both 'list' and 'report' dmstats report will use
the correct report object type and ensure that it is initialised
appropriately for the field selection in use.
tools/dmsetup.c
This page took 0.037432 seconds and 5 git commands to generate.