1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/libdm/dm-tools
Bryn M. Reeves 29b9ccd261 dmsetup: fix error propagation in _display_info_cols()
Commit 3f35146 added a check on the value returned by the
_display_info_cols() function:

  1024         if (!_switches[COLS_ARG])
  1025                 _display_info_long(dmt, &info);
  1026         else
  1027                 r = _display_info_cols(dmt, &info);
  1028
  1029         return r;

This exposes a bug in the dmstats code in _display_info_cols:
the fact that a device has no regions is explicitly not an error
(and is documented as such in the code), but since the return
code is not changed before leaving the function it is now treated
as an error leading to:

  # dmstats list
  Command failed.

When no regions exist.

Set the return code to the correct value before returning.
2018-06-28 14:25:30 +01:00
..
.gitignore dmfilemapd: Move to libdm/dm-tools 2018-06-14 14:27:19 +01:00
dmfilemapd.c dmfilemapd: Move to libdm/dm-tools 2018-06-14 14:27:19 +01:00
dmsetup.c dmsetup: fix error propagation in _display_info_cols() 2018-06-28 14:25:30 +01:00
Makefile.in dmfilemapd: Move to libdm/dm-tools 2018-06-14 14:27:19 +01:00
util.h dmsetup: move to libdm/dm-tools/dmsetup 2018-06-14 13:10:17 +01:00