udev-block-add-change: don't exclude already attached devs

For example, attaching a device-mapper device to another VM increases
its "dmsetup info" open count in is_used(), which triggered its removal
from qvm-block.
pull/6/head
Rusty Bird 8 years ago
parent e7d7111f13
commit 6b32378158
No known key found for this signature in database
GPG Key ID: 469D78F47AAF2ADF

@ -11,6 +11,10 @@ MODE=w
QDB_KEY="/qubes-block-devices/$NAME"
xs_remove() {
if is_attached /sys$DEVPATH; then
return 0
fi
if [ "$QUBES_EXPOSED" == "1" ]; then
qubesdb-rm "$QDB_KEY/"
qubesdb-write /qubes-block-devices ''

Loading…
Cancel
Save