udev: skip empty device-mapper nodes

It can happen during device reconfiguration - do not decide to expose
the device until its known what device it will be.
This fixes bug where root.img was visible in qvm-block as normal device
and could be detached.
release2 mm_58df64ad
Marek Marczykowski-Górecki 10 years ago
parent 44e5c20806
commit 58df64ad20

@ -12,6 +12,7 @@ ENV{MAJOR}=="202", GOTO="qubes_block_end"
# Skip device-mapper devices
ENV{MAJOR}=="253", ENV{DM_NAME}=="snapshot-*", GOTO="qubes_block_end"
ENV{MAJOR}=="253", ENV{DM_NAME}=="", GOTO="qubes_block_end"
IMPORT{db}="QUBES_EXPOSED"
ACTION=="add", IMPORT{program}="/usr/bin/flock /var/run/qubes-udev.lock -c /usr/libexec/qubes/udev-block-add-change"

Loading…
Cancel
Save