libmultipath: allow dumping only "local" hwtable in snprint_config
authorMartin Wilck <mwilck@suse.com>
Fri, 8 Jun 2018 10:20:33 +0000 (12:20 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Thu, 21 Jun 2018 07:49:51 +0000 (09:49 +0200)
commit38a64ac2e956a2a0ae01f670ff04304d30a9d4aa
tree40a1bd2c9dbaabd55bece76844fd14b750482b1f
parenta429b93d151b09694af88a730046192a3506608f
libmultipath: allow dumping only "local" hwtable in snprint_config

This change is key for allowing to dump the "local" multipath configuration
only, i.e. those entries of the hardware table that match existing devices
in the system. By passing the output of the new helper function
get_used_hwes() as the last argument for snprint_config(), only the local
entries will be dumped.

The rationale is that "multipath -t" output is overwhelmingly long for most
use cases; in particular it's not useful as a template for creating a local
configuration.

Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/print.c
libmultipath/print.h
libmultipath/structs_vec.c
libmultipath/structs_vec.h
libmultipath/vector.c
libmultipath/vector.h
multipath/main.c
multipathd/cli_handlers.c
tests/hwtable.c