New option tsize= with -as cdrecord
This commit is contained in:
parent
1df494e339
commit
8fd8bd55f8
@ -2,7 +2,7 @@
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH XORRISO 1 "Jul, 14, 2008"
|
||||
.TH XORRISO 1 "Jul, 15, 2008"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
@ -1801,7 +1801,7 @@ Personality "\fBcdrecord\fR" accepts the options listed with:
|
||||
.br
|
||||
-as cdrecord -help --
|
||||
.br
|
||||
Among them: -v, dev=, speed=, blank=, fs=, -eject, -atip, padsize=,
|
||||
Among them: -v, dev=, speed=, blank=, fs=, -eject, -atip, padsize=, tsize=,
|
||||
-isosize, -multi, -msinfo, --grow_overwriteable_iso, write_start_address=,
|
||||
track source file path or "-" for standard input as track source.
|
||||
.br
|
||||
@ -2135,7 +2135,6 @@ first and only session to the output drive.
|
||||
| gzip >image.iso.gz
|
||||
.SS
|
||||
.B Perform multi-session runs as of cdrtools traditions
|
||||
This shall illustrate how xorriso can act in either role.
|
||||
Between both processes there can be performed arbitrary transportation
|
||||
or filtering.
|
||||
.br
|
||||
@ -2151,11 +2150,15 @@ Follow-up sessions are written like this:
|
||||
.br
|
||||
\fB$\fR xorriso -as mkisofs -M /dev/sr0 -C $m prepared_for_iso/tree2 | \\
|
||||
.br
|
||||
xorriso -as cdrecord -v dev=/dev/sr0 -multi -eject -
|
||||
xorriso -as cdrecord -v dev=/dev/sr0 -waiti -multi -eject -
|
||||
.br
|
||||
Always eject the drive tray between sessions. The old sessions
|
||||
get read via stdio:/dev/sr0 and thus are prone to device driver
|
||||
peculiarities.
|
||||
.br
|
||||
This example works for multi-session media only.
|
||||
Add cdrskin option --grow_overwriteable_iso to all -as cdrecord runs
|
||||
in order to enable multi-session emulation on overwriteable media.
|
||||
.SS
|
||||
.B Let xorriso work underneath growisofs
|
||||
growisofs expects an ISO formatter program which understands options -o, -C,
|
||||
|
@ -7073,7 +7073,7 @@ int Xorriso_cdrskin(struct XorrisO *xorriso, char *whom, int argc, char **argv,
|
||||
int do_atip= 0, do_checkdrive= 0, do_eject= 0, do_scanbus= 0;
|
||||
int do_toc= 0, do_verbous= 0, do_version= 0, do_help= 0, do_waiti= 0;
|
||||
int do_multi= 0, do_msinfo= 0, do_grow= 0, do_isosize= 0;
|
||||
double write_start_address= -1.0;
|
||||
double write_start_address= -1.0, tsize= -1.0;
|
||||
char track_source[SfileadrL], sfe[5*SfileadrL], dev_adr[SfileadrL], *cpt;
|
||||
char mem_report_about_text[80], *report_about= "SORRY", blank_mode[80];
|
||||
char speed[80];
|
||||
@ -7091,8 +7091,6 @@ int Xorriso_cdrskin(struct XorrisO *xorriso, char *whom, int argc, char **argv,
|
||||
|
||||
"direct_write_amount=", "msifile=",
|
||||
|
||||
"tsize=",
|
||||
|
||||
""
|
||||
};
|
||||
static char ignored_full_options[][41]= {
|
||||
@ -7138,8 +7136,10 @@ int Xorriso_cdrskin(struct XorrisO *xorriso, char *whom, int argc, char **argv,
|
||||
"\t-atip\t\tretrieve media state, print \"Is *erasable\"",
|
||||
"\t-multi\t\tgenerate a TOC that allows multi session",
|
||||
"\t-waiti\t\twait until input is available before opening SCSI",
|
||||
"\ttsize=#\t\tannounces exact size of source data",
|
||||
"\tpadsize=#\tAmount of padding",
|
||||
"\t-data\t\tSubsequent tracks are CD-ROM data mode 1 (default)",
|
||||
"\t-isosize\tUse iso9660 file system size for next data track",
|
||||
"\t-pad\t\tpadsize=30k",
|
||||
"\t-nopad\t\tDo not pad",
|
||||
"\t--grow_overwriteable_iso\temulate multi-session on DVD+RW",
|
||||
@ -7324,6 +7324,18 @@ no_volunteer:;
|
||||
speed[79]= 0;
|
||||
} else if(strcmp(argv[i], "-toc")==0) {
|
||||
do_toc= 1;
|
||||
} else if(strncmp(argv[i], "-tsize=", 7)==0 ||
|
||||
strncmp(argv[i], "tsize=", 6)==0) {
|
||||
|
||||
/* MULTI : tsize= */
|
||||
|
||||
cpt= strchr(argv[i], '=')+1;
|
||||
tsize= Scanf_io_size(cpt, 1);
|
||||
if(tsize > 1024.0*1024.0*1024.0*1024.0*1024.0) {
|
||||
sprintf(xorriso->info_text, "-as %s: much too large: %s",whom, argv[i]);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
ret= 0; goto ex;
|
||||
}
|
||||
} else if(strcmp(argv[i], "-v")==0 || strcmp(argv[i],"-verbose")==0) {
|
||||
do_verbous++;
|
||||
} else if(strcmp(argv[i], "-vv")==0) {
|
||||
@ -7337,11 +7349,8 @@ no_volunteer:;
|
||||
} else if(strncmp(argv[i], "write_start_address=", 20)==0) {
|
||||
|
||||
/* MULTI : allow write_start_address= */
|
||||
|
||||
write_start_address= Scanf_io_size(argv[i]+20,0);
|
||||
|
||||
/* ??? >>> MULTI : combine write_start_address=32 with --grow_overwriteable_iso */
|
||||
/* ??? >>> MULTI : ??? how about cdrskin. shouldn't it combine too ? */
|
||||
|
||||
} else if(argv[i][0]=='-' && argv[i][1]!=0) {
|
||||
sprintf(xorriso->info_text, "-as %s: Unknown option %s",
|
||||
whom, Text_shellsafe(argv[i], sfe, 0));
|
||||
@ -7389,10 +7398,10 @@ no_volunteer:;
|
||||
/* MULTI :
|
||||
if grow_overwriteable_iso :
|
||||
consider overwriteables with ISO as appendable */
|
||||
|
||||
hflag= 2|32;
|
||||
if(!do_grow)
|
||||
hflag|= 8; /* consider overwriteables as blank */
|
||||
|
||||
ret= Xorriso_option_dev(xorriso, dev_adr, hflag);
|
||||
if(ret<=0)
|
||||
goto ex;
|
||||
@ -7431,6 +7440,7 @@ no_volunteer:;
|
||||
}
|
||||
|
||||
/* MULTI : perform -msinfo */
|
||||
|
||||
if(do_msinfo) {
|
||||
ret= Xorriso_msinfo(xorriso, &msc1, &msc2, 2 | !!do_grow);
|
||||
if(ret<=0)
|
||||
@ -7485,7 +7495,8 @@ no_volunteer:;
|
||||
|
||||
xorriso->do_close= !do_multi;
|
||||
ret= Xorriso_burn_track(xorriso, (off_t) write_start_address,
|
||||
track_source, (!!do_grow)|((!!do_isosize)<<1));
|
||||
track_source, (off_t) tsize,
|
||||
(!!do_grow)|((!!do_isosize)<<1));
|
||||
aq_ret= Xorriso_reaquire_outdev(xorriso, 2*(ret>0));
|
||||
if(ret<=0 && ret<aq_ret)
|
||||
goto ex;
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2008.07.15.063040"
|
||||
#define Xorriso_timestamP "2008.07.15.121754"
|
||||
|
@ -5942,11 +5942,12 @@ int Xorriso_atip(struct XorrisO *xorriso, int flag)
|
||||
|
||||
|
||||
/* @param write_start_address is valid if >=0
|
||||
@param tsize is valid if >0
|
||||
@param flag bit0= grow_overwriteable_iso
|
||||
bit1= do_isosize
|
||||
*/
|
||||
int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
|
||||
char *track_source, int flag)
|
||||
char *track_source, off_t tsize, int flag)
|
||||
{
|
||||
int ret, fd, unpredicted_size, profile_number, is_cd= 0, dummy, nwa= -1;
|
||||
int isosize= -1, i, full_size, do_isosize;
|
||||
@ -5976,9 +5977,8 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
|
||||
session= burn_session_create();
|
||||
ret= burn_disc_add_session(disc,session,BURN_POS_END);
|
||||
if(ret==0) {
|
||||
|
||||
/* >>> */;
|
||||
|
||||
sprintf(xorriso->info_text, "Cannot add session object to disc object.");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
||||
goto ex;
|
||||
}
|
||||
track= burn_track_create();
|
||||
@ -6069,7 +6069,13 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
|
||||
if(isoburn_needs_emulation(drive))
|
||||
burn_write_opts_set_multi(burn_options, 0);
|
||||
|
||||
/* >>> MULTI : if -isosize :
|
||||
/* MULTI : tsize */
|
||||
if(tsize > 0) {
|
||||
fixed_size= tsize;
|
||||
burn_track_set_size(track, fixed_size);
|
||||
}
|
||||
|
||||
/* MULTI : if -isosize :
|
||||
*/
|
||||
if(do_isosize) {
|
||||
ret= burn_fifo_peek_data(xorriso->pacifier_fifo, head_buffer, 64*1024, 0);
|
||||
|
@ -189,10 +189,12 @@ int Xorriso_iso_lstat(struct XorrisO *xorriso, char *path, struct stat *stbuf,
|
||||
int Xorriso_atip(struct XorrisO *xorriso, int flag);
|
||||
|
||||
/* @param write_start_address is valid if >=0
|
||||
@param tsize is valid if >0
|
||||
@param flag bit0= grow_overwriteable_iso
|
||||
bit1= do_isosize
|
||||
*/
|
||||
int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
|
||||
char *track_source, int flag);
|
||||
char *track_source, off_t tsize, int flag);
|
||||
|
||||
/* @param flag bit1= outdev rather than indev
|
||||
@return <=0 = failure , 1= ok , 2= ok, is CD profile
|
||||
|
Loading…
Reference in New Issue
Block a user