libmpathpersist: use extern struct udev from main program
authorMartin Wilck <mwilck@suse.com>
Sun, 26 Mar 2017 13:49:47 +0000 (15:49 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 21 Jun 2017 10:23:41 +0000 (12:23 +0200)
commit9ccfce047722c5223bb17e441ea7e90b42b5bb21
tree99318fe19c3b4d7052259621fae002fc9ab18e5a
parent4285fc8f4f24b7fef902b714d489e15a1dc29569
libmpathpersist: use extern struct udev from main program

Use the global variable "udev" - the internal one is not
initialized, causing current libudev calls to fail.
In the main program "mpathpersist", use a globally visible
variable "udev" rather than a local variable in main().
This imitates the way the global variable "udev" is used
in multipath and multipathd.

Removed the "udev" parameter from mpath_lib_init() to
clarify that it isn't used.

Fixes: b87454988 "libmultipath: separate out 'udev' config entry"
Signed-off-by: Martin Wilck <mwilck@suse.com>
libmpathpersist/mpath_persist.c
libmpathpersist/mpath_persist.h
mpathpersist/main.c