summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--udev-block-notify.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/udev-block-notify.c b/udev-block-notify.c
index 706f962..4a8f439 100644
--- a/udev-block-notify.c
+++ b/udev-block-notify.c
@@ -148,6 +148,17 @@ int main (int argc, char ** argv) {
dev = udev_monitor_receive_device(mon);
if(dev) {
device = (char *) udev_device_get_sysname(dev);
+
+ /* ignore temporary device mapper devices
+ * is there a better way to do this? */
+ if (strncmp(device, "dm", 2) == 0 &&
+ udev_device_get_property_value(dev, "DM_NAME") == NULL) {
+# if DEBUG
+ printf("%s: Skipping temporary dm device %s\n", argv[0], device);
+# endif
+ continue;
+ }
+
devnum = udev_device_get_devnum(dev);
major = major(devnum);
minor = minor(devnum);