forked from pool/cryptsetup
29 lines
696 B
Diff
29 lines
696 B
Diff
|
Index: cryptsetup-1.0.5/lib/libdevmapper.c
|
||
|
===================================================================
|
||
|
--- cryptsetup-1.0.5.orig/lib/libdevmapper.c
|
||
|
+++ cryptsetup-1.0.5/lib/libdevmapper.c
|
||
|
@@ -18,6 +18,13 @@
|
||
|
|
||
|
#define CRYPT_TARGET "crypt"
|
||
|
|
||
|
+#define UDEVSETTLE "/sbin/udevsettle"
|
||
|
+
|
||
|
+static void run_udevsettle(void)
|
||
|
+{
|
||
|
+ system(UDEVSETTLE);
|
||
|
+}
|
||
|
+
|
||
|
static void set_dm_error(int level, const char *file, int line,
|
||
|
const char *f, ...)
|
||
|
{
|
||
|
@@ -184,6 +191,9 @@ static int dm_create_device(int reload,
|
||
|
if (dmi.read_only)
|
||
|
options->flags |= CRYPT_FLAG_READONLY;
|
||
|
|
||
|
+ /* run udevsettle to avoid problems with busy dm devices */
|
||
|
+ run_udevsettle();
|
||
|
+
|
||
|
r = 0;
|
||
|
|
||
|
out:
|