libmultipath: use vector for for pp->hwe and mp->hwe
authorMartin Wilck <mwilck@suse.com>
Fri, 8 Jun 2018 10:20:25 +0000 (12:20 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Thu, 21 Jun 2018 07:49:07 +0000 (09:49 +0200)
commitf0462f0c833883651598e333b1ae42f604034596
tree13c4cb6691aac4f1b85082e210c45c0acd80af97
parent06444d6aefaececc2860b3e4d48468a126deadfb
libmultipath: use vector for for pp->hwe and mp->hwe

Change the data structure of "struct path" and "struct multipath"
such that the "hwe" entry is a vector of hwentry structures rather
than a single hwentry structure. Add respective code to the
constructors and destructors (note that mp->hwe is never allocated,
it's always a pointer to a path hwe).

Change find_hwe() to fill in the passed vector rather than returning
a hwentry pointer. Change the propsel code to look through vectors
of hwentries to determine a given property.

This patch just creates the new data structure and the functions to
deal with them, it doesn't introduce semantic changes.

Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/config.c
libmultipath/config.h
libmultipath/discovery.c
libmultipath/propsel.c
libmultipath/structs.c
libmultipath/structs.h