1
Subject: [PATCH] HAL: Ignore internal DM devices with new DM udev rules
2
From: Milan Broz <mbroz@redhat.com>
3
Date: Tue, 13 Jul 2010 14:08:14 +0200
5
With new device-mapper udev rules are /dev/mapper/* symlinks
6
to basic device name /dev/dm-X.
7
(Change requested by udev upstream.)
9
This change breaks temporary-cryptsetup workaround inside hal.
11
With new dm-udev rules (uncluded since device-mapper 1.02.39)
12
there is DM_UDEV_DISABLE_OTHER_RULES_FLAG variable
13
which controls that scan should be ignored for this device
14
(it is set for all internal devices, including temporary cryptsetup,
15
internal parts of lvm devices etc.)
17
Ignore device if this flag is set.
20
https://bugzilla.redhat.com/show_bug.cgi?id=613909
21
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586286
23
Signed-off-by: Milan Broz <mbroz@redhat.com>
25
hald/linux/osspec.c | 5 +++++
26
1 files changed, 5 insertions(+), 0 deletions(-)
28
diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c
29
index a8233fd..6d616bc 100644
30
--- a/hald/linux/osspec.c
31
+++ b/hald/linux/osspec.c
32
@@ -215,6 +215,11 @@ hald_udev_data (GIOChannel *source, GIOCondition condition, gpointer user_data)
36
+ } else if (strncmp(key, "DM_UDEV_DISABLE_OTHER_RULES_FLAG=", 33) == 0) {
37
+ if (strtoul(&key[33], NULL, 10) == 1) {
38
+ HAL_INFO (("ignoring device requested by DM udev rules"));