summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2008-09-14 01:41:51 +0000
committerDoug Goldstein <cardoe@gentoo.org>2008-09-14 01:41:51 +0000
commit73e4a8d4fae893bbd8dae30c9bb952465c8ff8d7 (patch)
tree7ef860b008ed2503e65835541ce61bb2c876eaf9 /sys-fs/cryptsetup/files
parentMask video_cards_ast, no hardware to test (diff)
downloadhistorical-73e4a8d4fae893bbd8dae30c9bb952465c8ff8d7.tar.gz
historical-73e4a8d4fae893bbd8dae30c9bb952465c8ff8d7.tar.bz2
historical-73e4a8d4fae893bbd8dae30c9bb952465c8ff8d7.zip
fix bug #236481. block udev-126 and higher on older versions that won't work with it. add udev as a depend since the code calls it always. remove old version
Package-Manager: portage-2.2_rc8/cvs/Linux 2.6.26-gentoo-r1 x86_64
Diffstat (limited to 'sys-fs/cryptsetup/files')
-rw-r--r--sys-fs/cryptsetup/files/cryptsetup-1.0.6-udevsettle.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/sys-fs/cryptsetup/files/cryptsetup-1.0.6-udevsettle.patch b/sys-fs/cryptsetup/files/cryptsetup-1.0.6-udevsettle.patch
new file mode 100644
index 000000000000..0d28732471e2
--- /dev/null
+++ b/sys-fs/cryptsetup/files/cryptsetup-1.0.6-udevsettle.patch
@@ -0,0 +1,35 @@
+2008-09-13 Doug Goldstein <cardoe@gentoo.org>
+ * switch to udevadm settle since udevsettle has been deprecated
+ and finally removed with udev 126.
+ * add message if udevadm settle fails to execute properly what the
+ consequence is
+
+diff -Nur cryptsetup-1.0.6/lib/libdevmapper.c cryptsetup-1.0.6-udevsettle/lib/libdevmapper.c
+--- cryptsetup-1.0.6/lib/libdevmapper.c 2007-10-25 03:11:19.000000000 -0400
++++ cryptsetup-1.0.6-udevsettle/lib/libdevmapper.c 2008-09-13 21:22:56.000000000 -0400
+@@ -18,11 +18,11 @@
+
+ #define CRYPT_TARGET "crypt"
+
+-#define UDEVSETTLE "/sbin/udevsettle"
++#define UDEVSETTLE "/sbin/udevadm settle"
+
+-static void run_udevsettle(void)
++static int run_udevsettle(void)
+ {
+- system(UDEVSETTLE);
++ return system(UDEVSETTLE);
+ }
+
+ static void set_dm_error(int level, const char *file, int line,
+@@ -192,7 +192,9 @@
+ options->flags |= CRYPT_FLAG_READONLY;
+
+ /* run udevsettle to avoid a race in libdevmapper causing busy dm devices */
+- run_udevsettle();
++ if (run_udevsettle() != 0)
++ fprintf(stderr, "%s unable to avoid potential race with busy "
++ "device-mapper devices", UDEVSETTLE);
+
+ r = 0;
+