1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Call dm_lib_exit() and dm_lib_release() automatically now.

This commit is contained in:
Alasdair Kergon 2005-05-16 15:15:34 +00:00
parent 6250023583
commit ebfe584afc
4 changed files with 5 additions and 8 deletions

View File

@ -1,5 +1,6 @@
Version 1.01.02 -
=============================
Call dm_lib_exit() and dm_lib_release() automatically now.
Add --target <target_type> filter to dmsetup table/status.
Fix dmsetup getopt_long usage.

View File

@ -117,6 +117,7 @@ static void *_align(void *ptr, unsigned int a)
return (void *) (((unsigned long) ptr + agn) & ~agn);
}
#ifdef DM_IOCTLS
static int _get_proc_number(const char *file, const char *name,
uint32_t *number)
{
@ -226,6 +227,7 @@ static int _create_control(const char *control, uint32_t major, uint32_t minor)
return 1;
}
#endif
static int _open_control(void)
{
@ -1396,10 +1398,7 @@ void dm_lib_release(void)
void dm_lib_exit(void)
{
if (_control_fd != -1) {
close(_control_fd);
_control_fd = -1;
}
dm_lib_release();
_version_ok = 1;
_version_checked = 0;
}

View File

@ -166,6 +166,6 @@ const char *dm_dir(void);
/* Release library resources */
void dm_lib_release(void);
void dm_lib_exit(void);
void dm_lib_exit(void) __attribute((destructor));
#endif /* LIB_DEVICE_MAPPER_H */

View File

@ -1073,8 +1073,5 @@ int main(int argc, char **argv)
exit(1);
}
dm_lib_release();
dm_lib_exit();
return 0;
}