libmultipath: print: use generic API for get_x_layout()
authorMartin Wilck <mwilck@suse.com>
Mon, 5 Mar 2018 23:14:58 +0000 (00:14 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 7 Mar 2018 09:39:53 +0000 (10:39 +0100)
commit04fa2c9b950a1f2b974555ff7b6cc3b1e58abeee
tree954d5874bac72eeecfeadd6e887104b079d6d74c
parent3d0084482051a3a430ee8dc3ba96aa3f4225f65f
libmultipath: print: use generic API for get_x_layout()

Introduce new functions _get_path_layout and _get_multipath_layout
using the new "generic" API to determine field widths, and map the
old API to them.

Furthermore, replace the boolean "header" by an enum with 3 possible
values. The new value LAYOUT_RESET_NOT allows calling the get_x_layout
function several times and determine the overall field width.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/print.c
libmultipath/print.h