From 42df8f913c71523aef11149d49f546bbde943163 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 16 Dec 2019 13:11:55 +0100 Subject: [PATCH] Fixed the test for mounted devices after umount. Regression by 8fee0fc. --- xorriso-dd-target/xorriso-dd-target | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xorriso-dd-target/xorriso-dd-target b/xorriso-dd-target/xorriso-dd-target index 983dc5e6..4b20a983 100755 --- a/xorriso-dd-target/xorriso-dd-target +++ b/xorriso-dd-target/xorriso-dd-target @@ -651,6 +651,7 @@ xdt_list_mounted_of() { } ## Unmount xdt_mounted_devs (maybe filled by xdt_list_mounted_of) +## $1 : base device name xdt_unmount() { if test -z "$xdt_mounted_devs" then @@ -674,7 +675,7 @@ xdt_unmount() { # Check again if any mount points still exist if test -z "$xdt_dummy_run" then - xdt_list_mounted_of "$2" + xdt_list_mounted_of "$1" if test -n "$xdt_mounted_devs" then echo "FAILURE: $xdt_sudo_cmd $xdt_umount_cmd could not remove all mounts: $xdt_mounted_devs" >&2 @@ -685,6 +686,8 @@ xdt_unmount() { } ## Does the work of unmounting and dd-ing +## $1 : image file path +## $2 : base device name xdt_write_image() { if test -z "$xdt_umount_cmd" @@ -705,7 +708,7 @@ xdt_write_image() { echo "Would do if not -dummy:" fi - xdt_unmount || return "$?" + xdt_unmount "$2" || return "$?" if test -z "$xdt_dd_cmd" then