@@ -133,3 +133,7 @@ LIBMPATHUTIL_2.0 {
LIBMPATHUTIL_2.1 {
libmp_basename;
};
+
+LIBMPATHUTIL_2.2 {
+ cleanup_udev_device;
+};
@@ -373,3 +373,9 @@ void cleanup_ucharp(unsigned char **p)
{
free(*p);
}
+
+void cleanup_udev_device(struct udev_device **udd)
+{
+ if (*udd)
+ udev_device_unref(*udd);
+}
@@ -10,6 +10,7 @@
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
+#include <libudev.h>
size_t strchop(char *);
@@ -139,4 +140,6 @@ static inline void clear_bit_in_bitfield(unsigned int bit, struct bitfield *bf)
void cleanup_charp(char **p);
void cleanup_ucharp(unsigned char **p);
+void cleanup_udev_device(struct udev_device **udd);
+
#endif /* _UTIL_H */
@@ -436,12 +436,6 @@ snprint_multipath_vpd_data(struct strbuf *buff,
return append_strbuf_str(buff, "[undef]");
}
-static void cleanup_udev_device(struct udev_device **udd)
-{
- if (*udd)
- udev_device_unref(*udd);
-}
-
static int
snprint_multipath_max_sectors_kb(struct strbuf *buff, const struct multipath *mpp)
{
@@ -53,7 +53,7 @@ vpd-test_OBJDEPS := $(multipathdir)/discovery.o
vpd-test_LIBDEPS := -ludev -lpthread -ldl
alias-test_TESTDEPS := test-log.o
alias-test_OBJDEPS := $(mpathutildir)/util.o
-alias-test_LIBDEPS := -lpthread -ldl
+alias-test_LIBDEPS := -ludev -lpthread -ldl
valid-test_OBJDEPS := $(multipathdir)/valid.o $(multipathdir)/discovery.o
valid-test_LIBDEPS := -lmount -ludev -lpthread -ldl
devt-test_LIBDEPS := -ludev