From: root Date: Mon, 16 May 2005 21:08:31 +0000 (+0200) Subject: [PATCH] call dm_lib_release/exit explicitly in multipath-tools X-Git-Tag: 0.4.5-pre3~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d1a34dbdb43b6093c6717468f44dc249fa504ec;p=platform%2Fupstream%2Fmultipath-tools.git [PATCH] call dm_lib_release/exit explicitly in multipath-tools multipath-tools should call dm_lib_release() and dm_lib_exit() before it returns. Then, libdevmapper will call update_devs() and finalize the device node operation which creates /dev/mapper/. This patch may not be needed if the latest libdevmapper of the device-mapper CVS is used, since in the latest version, dm_lib_exit() calls dm_lib_release() and dm_lib_exit() is called by default when the program returns. Regards, Kiyoshi Ueda --- diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c index 5d714bf..cf7eda9 100644 --- a/kpartx/kpartx.c +++ b/kpartx/kpartx.c @@ -429,6 +429,9 @@ main(int argc, char **argv){ if (n > 0) break; } + dm_lib_release(); + dm_lib_exit(); + return 0; } diff --git a/multipath/main.c b/multipath/main.c index 5900cb6..e3c4c29 100644 --- a/multipath/main.c +++ b/multipath/main.c @@ -1004,6 +1004,8 @@ out: free_multipathvec(curmp, KEEP_PATHS); free_pathvec(pathvec, FREE_PATHS); free_config(conf); + dm_lib_release(); + dm_lib_exit(); #ifdef _DEBUG_ dbg_free_final(NULL); #endif