linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HAL: Ignore internal DM devices with new DM udev rules
@ 2010-07-13 12:08 Milan Broz
  2010-07-14  9:12 ` Robby Workman
  2010-07-14  9:43 ` Milan Broz
  0 siblings, 2 replies; 3+ messages in thread
From: Milan Broz @ 2010-07-13 12:08 UTC (permalink / raw)
  To: linux-hotplug

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 <mbroz@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-14  9:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-13 12:08 [PATCH] HAL: Ignore internal DM devices with new DM udev rules Milan Broz
2010-07-14  9:12 ` Robby Workman
2010-07-14  9:43 ` Milan Broz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).