1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: restore disable_dev behavior

Notify needs to go  with major:minor before device disappears.
This commit is contained in:
Zdenek Kabelac 2014-05-21 16:59:38 +02:00
parent 8db67d2aff
commit 9c4953df1b

View File

@ -413,14 +413,9 @@ disable_dev() {
min=$(($(stat -L --printf=0x%T "$dev"))) min=$(($(stat -L --printf=0x%T "$dev")))
echo "Disabling device $dev ($maj:$min)" echo "Disabling device $dev ($maj:$min)"
dmsetup remove -f "$dev" 2>/dev/null || true dmsetup remove -f "$dev" 2>/dev/null || true
done
finish_udev_transaction
for dev in "$@"; do
maj=$(($(stat -L --printf=0x%t "$dev")))
min=$(($(stat -L --printf=0x%T "$dev")))
notify_lvmetad --major "$maj" --minor "$min" notify_lvmetad --major "$maj" --minor "$min"
done done
finish_udev_transaction
} }
enable_dev() { enable_dev() {