X-Git-Url: https://git.distorted.org.uk/~mdw/dvdrip/blobdiff_plain/d0a95de5e7eac0065c2d68e6264c0b5e88979365..8ed763a58ec8c9f402d2ee30164c59a613afba93:/dvd-sector-copy.c diff --git a/dvd-sector-copy.c b/dvd-sector-copy.c index a608410..ee89f2a 100644 --- a/dvd-sector-copy.c +++ b/dvd-sector-copy.c @@ -95,8 +95,8 @@ static void put_menu(dvd_reader_t *dvd, unsigned title) store_filename(fn, id); start = UDFFindFile(dvd, fn, &len); if (!start) return; #ifdef DEBUG - printf(";; %8"PRIuSEC" .. %-8"PRIuSEC": %s\n", - start, start + SECTORS(len), fn); + printf(";; %8"PRIuSEC" .. %-8"PRIuSEC": %s\n", + start, start + SECTORS(len), fn); #endif put_file(id, start, start + SECTORS(len)); } @@ -487,9 +487,9 @@ static ssize_t recovery_read_buffer(struct recoverybuf *r, #endif } } else if (pos > r->pos + r->end) { - r->pos = pos; r->start = r->end = 0; + r->pos = pos; r->start = r->end = 0; #ifdef DEBUG - show_recovery_buffer_map(r, "cleared; beyond previous region"); + show_recovery_buffer_map(r, "cleared; beyond previous region"); #endif } else if (pos + want > r->pos + r->sz) { diff = (pos + want) - (r->pos + r->sz); @@ -1043,7 +1043,7 @@ int main(int argc, char *argv[]) #endif } - open_dvd(device, O_RDONLY, &dvdfd, &dvd); + if (open_dvd(device, O_RDONLY, &dvdfd, &dvd)) exit(2); blksz = SECTORSZ; volsz = device_size(dvdfd, device, &blksz); if (blksz != SECTORSZ) @@ -1053,7 +1053,7 @@ int main(int argc, char *argv[]) device, volsz, SECTORSZ); if (f&f_checkid) { - open_dvd(outfile, O_RDONLY, 0, &dvd_out); + if (open_dvd(outfile, O_RDONLY, 0, &dvd_out)) exit(2); if (dvd_id(id_in, dvd, DIF_MUSTIFOHASH, device) || dvd_id(id_out, dvd_out, DIF_MUSTIFOHASH, device)) exit(2);