@@ -66,6 +66,7 @@ global:
check_foreign;
cleanup_bindings;
cleanup_lock;
+ cleanup_multipath_and_paths;
coalesce_paths;
count_active_paths;
delete_all_foreign;
@@ -329,6 +329,18 @@ free_multipath (struct multipath * mpp, enum free_path_mode free_paths)
free(mpp);
}
+void cleanup_multipath(struct multipath **pmpp)
+{
+ if (*pmpp)
+ free_multipath(*pmpp, KEEP_PATHS);
+}
+
+void cleanup_multipath_and_paths(struct multipath **pmpp)
+{
+ if (*pmpp)
+ free_multipath(*pmpp, FREE_PATHS);
+}
+
void
drop_multipath (vector mpvec, char * wwid, enum free_path_mode free_paths)
{
@@ -544,6 +544,8 @@ void free_pathvec (vector vec, enum free_path_mode free_paths);
void free_pathgroup (struct pathgroup * pgp, enum free_path_mode free_paths);
void free_pgvec (vector pgvec, enum free_path_mode free_paths);
void free_multipath (struct multipath *, enum free_path_mode free_paths);
+void cleanup_multipath(struct multipath **pmpp);
+void cleanup_multipath_and_paths(struct multipath **pmpp);
void free_multipath_attributes (struct multipath *);
void drop_multipath (vector mpvec, char * wwid, enum free_path_mode free_paths);
void free_multipathvec (vector mpvec, enum free_path_mode free_paths);