From d25e03550a26860cb50ad184eb3948e8396d2d61 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 24 Sep 2013 15:22:00 +0200 Subject: ignore temporary device mapper devices --- udev-block-notify.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); -- cgit v1.2.3-70-g09d2