Add some cdrdao image reading support from Svend S. Sorensen's
cuetools cdio.c: remove some complicated and extraneous code for auto-driver detection.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: cd-read.c,v 1.16 2004/02/07 02:40:20 rocky Exp $
|
||||
$Id: cd-read.c,v 1.17 2004/05/04 02:06:48 rocky Exp $
|
||||
|
||||
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -41,6 +41,7 @@ enum {
|
||||
OP_SOURCE_BIN,
|
||||
OP_SOURCE_CUE,
|
||||
OP_SOURCE_NRG = DRIVER_NRG,
|
||||
OP_SOURCE_CDRDAO = DRIVER_CDRDAO,
|
||||
OP_SOURCE_DEVICE = DRIVER_DEVICE,
|
||||
|
||||
/* These are the remaining configuration options */
|
||||
@@ -219,6 +220,9 @@ parse_options (int argc, const char *argv[])
|
||||
{"nrg-file", 'N', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name,
|
||||
OP_SOURCE_NRG, "set Nero CD-ROM disk image file as source", "FILE"},
|
||||
|
||||
{"toc-file", 't', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name,
|
||||
OP_SOURCE_CDRDAO, "set \"TOC\" CD-ROM disk image file as source", "FILE"},
|
||||
|
||||
{"output-file", 'o', POPT_ARG_STRING, &opts.output_file, 0,
|
||||
"Output blocks to file rather than give a hexdump."},
|
||||
|
||||
@@ -472,6 +476,14 @@ main(int argc, const char *argv[])
|
||||
source_name);
|
||||
}
|
||||
break;
|
||||
|
||||
case IMAGE_CDRDAO:
|
||||
cdio = cdio_open (source_name, DRIVER_CDRDAO);
|
||||
if (cdio==NULL) {
|
||||
err_exit("Error in opening TOC file %s for input\n",
|
||||
source_name);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (opts.access_mode!=NULL) {
|
||||
|
||||
Reference in New Issue
Block a user