diff --git a/xorriso-dd-target/xorriso-dd-target.xdt b/xorriso-dd-target/xorriso-dd-target.xdt index cbe292c6..79f0bccb 100755 --- a/xorriso-dd-target/xorriso-dd-target.xdt +++ b/xorriso-dd-target/xorriso-dd-target.xdt @@ -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