Fixed the test for mounted devices after umount. Regression by 8fee0fc.

master
Thomas Schmitt 3 years ago
parent 93ebe301f7
commit 42df8f913c
  1. 7
      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

Loading…
Cancel
Save