Add temporary debug code to allow better debugging of races

with various udev-event tools which wrongly scan and open
internal temporary cryptsetup devices.

If cryptsetup run in debug mode (--debug) and remove of device
fails, code scan /proc directory and tries to find process name
which locked that device.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@141 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
Milan Broz
2009-11-15 19:26:36 +00:00
parent 16faeae057
commit c3064c9442
6 changed files with 142 additions and 0 deletions

View File

@@ -47,6 +47,11 @@ void crypt_set_debug_level(int level)
_debug_level = level;
}
int crypt_get_debug_level()
{
return _debug_level;
}
void crypt_log(struct crypt_device *cd, int class, const char *msg)
{
if (cd && cd->log)