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

Export and use only valid cookie value in test suite.

This commit is contained in:
Peter Rajnoha 2010-03-23 14:47:35 +00:00
parent 5161ecb98d
commit 2e08dbcb65
2 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.63 -
================================
Export and use only valid cookie value in test suite.
Remove const modifier for struct volume_group* from process_each_lv_in_vg().
Don't allow resizing of internal logical volumes.
Fix libdevmapper-event pkgconfig version string to match libdevmapper.

View File

@ -43,12 +43,16 @@ STACKTRACE() {
init_udev_transaction() {
if test "$DM_UDEV_SYNCHRONISATION" = 1; then
export DM_UDEV_COOKIE=$(dmsetup udevcreatecookie)
COOKIE=$(dmsetup udevcreatecookie)
# Cookie is not generated if udev is not running!
if test -n "$COOKIE"; then
export DM_UDEV_COOKIE=$COOKIE
fi
fi
}
finish_udev_transaction() {
if test "$DM_UDEV_SYNCHRONISATION" = 1; then
if test "$DM_UDEV_SYNCHRONISATION" = 1 -a -n "$DM_UDEV_COOKIE"; then
dmsetup udevreleasecookie
unset DM_UDEV_COOKIE
fi