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.
exit(1);
}
- dm_lib_release();
- dm_lib_exit();
-
return 0;
}
return (void *) (((unsigned long) ptr + agn) & ~agn);
}
+#ifdef DM_IOCTLS
static int _get_proc_number(const char *file, const char *name,
uint32_t *number)
{
return 1;
}
+#endif
static int _open_control(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;
}
/* 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 */