Some corrections of the previous commit

This commit is contained in:
Thomas Schmitt 2019-12-12 20:59:09 +01:00
parent ab2af1dff2
commit f6c56febbf
1 changed files with 10 additions and 11 deletions

View File

@ -7,7 +7,7 @@
# All names of variables and functions begin by "xdt_" in order to facilitate
# the re-use of this code by inclusion or forking and expansion.
# Before using most of the other functions it is necessary to run
# Before using most of the functions it is necessary to run
# xdt_init ; xdt_reset_job
# The only function which may be run earlier is xdt_set_lang_c .
# The function xtd_main gets run by the code at the end of this file
@ -767,11 +767,10 @@ xdt_decide_writing()
xdt_dummy=dummy
else
echo "WRITE RUN PREVENTED by user input '$xdt_dummy'." >&2
return 12
return 17
fi
fi
xdt_write_image "$xdt_image_file" $xdt_candidates
exit $?
xdt_write_image "$xdt_image_file" $xdt_candidates || return "$?"
else
xdt_candidates=$(echo $xdt_candidates)
if test -n "$xdt_dummy_run"
@ -815,32 +814,32 @@ xdt_decide_writing()
xdt_main()
{
xdt_set_lang_c
xdt_init || exit "$?"
xdt_init || return "$?"
xdt_reset_job
xdt_arg_interpreter "$@" || exit "$?"
xdt_arg_interpreter "$@" || return "$?"
if test -n "$xdt_do_plug_test"
then
xdt_plug_in_watcher || exit "$?"
xdt_plug_in_watcher || return "$?"
fi
xdt_list_devices || exit "$?"
xdt_list_devices || return "$?"
if test -z "$xdt_list_all" -a -n "$xdt_do_write"
then
xdt_decide_writing || exit "$?"
xdt_decide_writing || return "$?"
fi
if test -n "$xdt_devs"
then
exit $xdt_not_advised
return $xdt_not_advised
fi
return 0
}
if test -z "$no_xorriso_dd_target_run"
then
xdt_main "$@"
xdt_main "$@" || exit "$?"
fi