From: Milan Broz Date: Tue, 13 Jul 2010 12:08:14 +0000 Subject: [PATCH] HAL: Ignore internal DM devices with new DM udev rules Message-Id: <1279022894-20089-1-git-send-email-mbroz@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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?ida3909 http://bugs.debian.org/cgi-bin/bugreport.cgi?bugX6286 Signed-off-by: Milan Broz --- hald/linux/osspec.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c index a8233fd..6d616bc 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; + } } } -- 1.7.1