@@ -453,26 +453,6 @@ pgcmp (struct multipath * mpp, struct multipath * cmpp)
return r;
}
-static struct udev_device *
-get_udev_for_mpp(const struct multipath *mpp)
-{
- dev_t devnum;
- struct udev_device *udd;
-
- if (!mpp || !has_dm_info(mpp)) {
- condlog(1, "%s called with empty mpp", __func__);
- return NULL;
- }
-
- devnum = makedev(mpp->dmi.major, mpp->dmi.minor);
- udd = udev_device_new_from_devnum(udev, 'b', devnum);
- if (!udd) {
- condlog(1, "failed to get udev device for %s", mpp->alias);
- return NULL;
- }
- return udd;
-}
-
void trigger_partitions_udev_change(struct udev_device *dev,
const char *action, int len)
{
@@ -339,3 +339,22 @@ bool sysfs_is_multipathed(struct path *pp, bool set_wwid)
return found;
}
+
+struct udev_device *get_udev_for_mpp(const struct multipath *mpp)
+{
+ dev_t devnum;
+ struct udev_device *udd;
+
+ if (!mpp || !has_dm_info(mpp)) {
+ condlog(1, "%s called with empty mpp", __func__);
+ return NULL;
+ }
+
+ devnum = makedev(mpp->dmi.major, mpp->dmi.minor);
+ udd = udev_device_new_from_devnum(udev, 'b', devnum);
+ if (!udd) {
+ condlog(1, "failed to get udev device for %s", mpp->alias);
+ return NULL;
+ }
+ return udd;
+}
@@ -39,4 +39,8 @@ do { \
int sysfs_get_size (struct path *pp, unsigned long long * size);
int sysfs_check_holders(char * check_devt, char * new_devt);
bool sysfs_is_multipathed(struct path *pp, bool set_wwid);
+
+struct multipath;
+struct udev_device *get_udev_for_mpp(const struct multipath *mpp);
+
#endif
No functional changes, just code movement. Signed-off-by: Martin Wilck <mwilck@suse.com> --- libmultipath/configure.c | 20 -------------------- libmultipath/sysfs.c | 19 +++++++++++++++++++ libmultipath/sysfs.h | 4 ++++ 3 files changed, 23 insertions(+), 20 deletions(-)