summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Broz <mbroz@redhat.com>2010-07-13 16:07:32 +0200
committerDanny Kukawka <danny.kukawka@web.de>2010-08-23 15:03:41 +0200
commit6f16321da13f6a7cbd9c424ddba2e727e434fa25 (patch)
tree8a71eb7534ab4fdc12b53d6dccf758537858f401
parentce8422fc8ec4881c5e54b651af3ef4ce2ca96847 (diff)
HAL: Ignore internal DM devices with new DM udev rules
With new device-mapper udev rules are /dev/mapper/* symlinks to basic device name /dev/dm-X. (Change requested by udev upstream.) This change breaks temporary-cryptsetup workaround inside hal. With new dm-udev rules (uncluded since device-mapper 1.02.39) there is DM_UDEV_DISABLE_OTHER_RULES_FLAG variable which controls that scan should be ignored for this device (it is set for all internal devices, including temporary cryptsetup, internal parts of lvm devices etc.) Ignore device if this flag is set. See bugs https://bugzilla.redhat.com/show_bug.cgi?id=613909 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586286 Signed-off-by: Milan Broz <mbroz@redhat.com>
-rw-r--r--hald/linux/osspec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c
index a8233fda..6d616bc8 100644
--- a/hald/linux/osspec.c
+++ b/hald/linux/osspec.c
@@ -215,6 +215,11 @@ hald_udev_data (GIOChannel *source, GIOCondition condition, gpointer user_data)
g_free (str);
}
g_free (dstr);
+ } else if (strncmp(key, "DM_UDEV_DISABLE_OTHER_RULES_FLAG=", 33) == 0) {
+ if (strtoul(&key[33], NULL, 10) == 1) {
+ HAL_INFO (("ignoring device requested by DM udev rules"));
+ goto invalid;
+ }
}
}