Initial commit: Uploaded everything from abs/core
[arch-rock.git] / base / cryptsetup / cryptsetup-1.0.5-run_udevsettle.patch
blob28f85e6be7172b2a680349124bbc0088df385b28
1 Index: cryptsetup-1.0.5/lib/libdevmapper.c
2 ===================================================================
3 --- cryptsetup-1.0.5.orig/lib/libdevmapper.c
4 +++ cryptsetup-1.0.5/lib/libdevmapper.c
5 @@ -18,6 +18,13 @@
7 #define CRYPT_TARGET "crypt"
9 +#define UDEVSETTLE "/sbin/udevsettle"
11 +static void run_udevsettle(void)
13 + system(UDEVSETTLE);
16 static void set_dm_error(int level, const char *file, int line,
17 const char *f, ...)
19 @@ -184,6 +191,9 @@ static int dm_create_device(int reload,
20 if (dmi.read_only)
21 options->flags |= CRYPT_FLAG_READONLY;
23 + /* run udevsettle to avoid problems with busy dm devices */
24 + run_udevsettle();
26 r = 0;
28 out: