diff options
author | Ruediger Meier | 2014-05-12 01:43:03 +0200 |
---|---|---|
committer | Ruediger Meier | 2014-05-12 16:25:16 +0200 |
commit | b5eb509709de3e720c155ae55c7aef2271f217ac (patch) | |
tree | 82a9ba87727d9317fcfba24030655d5f744a995c /tests/functions.sh | |
parent | setterm: convert remaining magic values to symbolic references (diff) | |
download | kernel-qcow2-util-linux-b5eb509709de3e720c155ae55c7aef2271f217ac.tar.gz kernel-qcow2-util-linux-b5eb509709de3e720c155ae55c7aef2271f217ac.tar.xz kernel-qcow2-util-linux-b5eb509709de3e720c155ae55c7aef2271f217ac.zip |
tests: ts_device_init remove useless error handling
Don't know why we should deinit the empty string.
This patch prepares further refactoring or error handling.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r-- | tests/functions.sh | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/functions.sh b/tests/functions.sh index 1dc671d9e..5b7324cfb 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -428,16 +428,13 @@ function ts_image_init { } function ts_device_init { - local img=$(ts_image_init $1 $2) - local dev=$($TS_CMD_LOSETUP --show -f "$img") + local img + local dev - if [ -z "$dev" ]; then - ts_device_deinit $dev - return 1 # error - fi + img=$(ts_image_init $1 $2) + dev=$($TS_CMD_LOSETUP --show -f "$img") echo $dev - return 0 # succes } function ts_device_deinit { |