echo "$discid" >"$tmp/$tag/discid.new"
mv "$tmp/$tag/discid.new" "$tmp/$tag/discid"
+echo "$dev" >"$tmp/$tag/device.new"
+mv "$tmp/$tag/device.new" "$tmp/$tag/device"
+
accumulate_badblocks () {
if [ -f "$tmp/$tag/badblocks.new" ]; then
if [ ! -f "$tmp/$tag/badblocks" ]; then
-b"$tmp/$tag/badblocks.new" "$@" "$dev" "$tmp/$tag/iso.new"
run mv "$tmp/$tag/iso.new" "$tmp/$tag/iso"
accumulate_badblocks
+ rm -f "$tmp/$tag/device"
case $retry in t) rm -f "$tmp/$tag/badblocks.retry" ;; esac
if [ -f "$tmp/$tag/badblocks" ]; then
fail "bad sectors found: check \`$tmp/$tag/iso', run again if ok"
fi
fi
+rm -f "$tmp/$tag/device"
run mv "$tmp/$tag/dest.new" "$tmp/$tag/dest"
if [ -f "$tmp/$tag/eject" ]; then eject=t; else eject=nil; fi
if [ -f "$tmp/$tag/ding" ]; then ding=t; else ding=nil; fi