]> sourceware.org Git - lvm2.git/commit
dmsetup: fix stats report command output
authorBryn M. Reeves <bmr@redhat.com>
Thu, 1 Nov 2018 16:49:05 +0000 (16:49 +0000)
committerBryn M. Reeves <bmr@redhat.com>
Thu, 1 Nov 2018 17:00:06 +0000 (17:00 +0000)
commit925aaf0b874fd92aec1b34f42d23987f65205ff9
tree3d51ea9ebe38388121fe4c7b0889a9b4ea0df3aa
parent19f2105b87773047854ef172de8fc48da110b2fa
dmsetup: fix stats report command output

Since the stats handle is neither bound nor listed before the
attempt to call dm_stats_get_nr_regions(), it will always return
zero: this prevents reporting of any dmstats regions on any
device.

Remove the dm_stats_get_nr_regions() check and instead rely on
the correct return status from dm_stats_populate() which only
returns 0 in the case that there are regions to inspect (and
which logs a specific error for all other cases).

Reported-by: Bryan Gurney <bgurney@redhat.com>
libdm/dm-tools/dmsetup.c
This page took 0.036812 seconds and 5 git commands to generate.