From: Mark Wooding Date: Sat, 19 Feb 2022 21:32:13 +0000 (+0000) Subject: dvd-sector-copy.c, dvdrip: Cue prompt to check image from `badblocks' file. X-Git-Url: https://git.distorted.org.uk/~mdw/dvdrip/commitdiff_plain/604a495002ac9390d760fffefcbe27372337cc38?ds=sidebyside dvd-sector-copy.c, dvdrip: Cue prompt to check image from `badblocks' file. The exit status from the final run isn't helpful, but the bad-blocks file is. --- diff --git a/dvd-sector-copy.c b/dvd-sector-copy.c index f70563c..03c2a0c 100644 --- a/dvd-sector-copy.c +++ b/dvd-sector-copy.c @@ -524,7 +524,6 @@ static void recovered(secaddr bad_lo, secaddr bad_hi) } if (lseek(outfd, (off_t)(bad_hi - bad_lo)*SECTORSZ, SEEK_CUR) < 0) bail_syserr(errno, "failed to seek past bad sectors"); - status = 1; } struct recoverybuf { diff --git a/dvdrip b/dvdrip index 250e642..ad7a280 100755 --- a/dvdrip +++ b/dvdrip @@ -151,21 +151,13 @@ case $backup in nil) if [ ! -f "$tmp/$tag/iso" ]; then accumulate_badblocks - run_setrc "$DVD_SECTOR_COPY" -c -b"$tmp/$tag/badblocks.new" \ - "$dev" "$tmp/$tag/iso.new" + run "$DVD_SECTOR_COPY" -c -b"$tmp/$tag/badblocks.new" \ + "$dev" "$tmp/$tag/iso.new" + run mv "$tmp/$tag/iso.new" "$tmp/$tag/iso" accumulate_badblocks - case $rc in - 0) - run mv "$tmp/$tag/iso.new" "$tmp/$tag/iso" - ;; - 1) - run mv "$tmp/$tag/iso.new" "$tmp/$tag/iso" - fail "bad sectors found: check \`$tmp/$tag/iso', run again if ok" - ;; - *) - fail "$DVD_SECTOR_COPY: exit $rc" - ;; - esac + if [ -f "$tmp/$tag/badblocks" ]; then + fail "bad sectors found: check \`$tmp/$tag/iso', run again if ok" + fi fi ;; esac