Enabled -multi and -msinfo with -as cdrecord
This commit is contained in:
parent
41aa050551
commit
25fd92f2c4
@ -2,7 +2,7 @@
|
|||||||
.\" First parameter, NAME, should be all caps
|
.\" First parameter, NAME, should be all caps
|
||||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||||
.\" other parameters are allowed: see man(7), man(1)
|
.\" other parameters are allowed: see man(7), man(1)
|
||||||
.TH XORRISO 1 "Jul, 08, 2008"
|
.TH XORRISO 1 "Jul, 10, 2008"
|
||||||
.\" Please adjust this date whenever revising the manpage.
|
.\" Please adjust this date whenever revising the manpage.
|
||||||
.\"
|
.\"
|
||||||
.\" Some roff macros, for reference:
|
.\" Some roff macros, for reference:
|
||||||
@ -1788,7 +1788,7 @@ Writing to stdout is possible only if -as "mkisofs" was among the start
|
|||||||
arguments or if other start arguments pointed the output drive to
|
arguments or if other start arguments pointed the output drive to
|
||||||
standard output.
|
standard output.
|
||||||
.br
|
.br
|
||||||
Personalites "\fBgenisoimage\fR" and "\fBgenisofs\fR"
|
Personalites "\fBxorrisofs\fR", "\fBgenisoimage\fR", and "\fBgenisofs\fR"
|
||||||
are aliases for "mkisofs".
|
are aliases for "mkisofs".
|
||||||
.br
|
.br
|
||||||
If xorriso is started with one of the leafnames "xorrisofs", "genisofs",
|
If xorriso is started with one of the leafnames "xorrisofs", "genisofs",
|
||||||
@ -2137,9 +2137,9 @@ growisofs expects an ISO formatter program which understands options -o, -C,
|
|||||||
.br
|
.br
|
||||||
\fB$\fR export MKISOFS="xorrisofs"
|
\fB$\fR export MKISOFS="xorrisofs"
|
||||||
.br
|
.br
|
||||||
\fB$\fR growisofs -Z /dev/dvd -R -J /some/files
|
\fB$\fR growisofs -Z /dev/dvd /some/files
|
||||||
.br
|
.br
|
||||||
\fB$\fR growisofs -M /dev/dvd -R -J /more/files
|
\fB$\fR growisofs -M /dev/dvd /more/files
|
||||||
.br
|
.br
|
||||||
If no "xorrisofs" is available on your system, then you will have to create
|
If no "xorrisofs" is available on your system, then you will have to create
|
||||||
a link pointing to the xorriso binary and tell growisofs to use it. E.g. by:
|
a link pointing to the xorriso binary and tell growisofs to use it. E.g. by:
|
||||||
|
@ -7066,9 +7066,10 @@ int Xorriso_reaquire_outdev(struct XorrisO *xorriso, int flag)
|
|||||||
int Xorriso_cdrskin(struct XorrisO *xorriso, char *whom, int argc, char **argv,
|
int Xorriso_cdrskin(struct XorrisO *xorriso, char *whom, int argc, char **argv,
|
||||||
int flag)
|
int flag)
|
||||||
{
|
{
|
||||||
int ret, i, k, mem_do_close, aq_ret, eject_ret;
|
int ret, i, k, mem_do_close, aq_ret, eject_ret, msc1, msc2;
|
||||||
int do_atip= 0, do_checkdrive= 0, do_eject= 0, do_scanbus= 0;
|
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_toc= 0, do_verbous= 0, do_version= 0, do_help= 0, do_waiti= 0;
|
||||||
|
int do_multi= 0, do_msinfo= 0;
|
||||||
char track_source[SfileadrL], sfe[5*SfileadrL], dev_adr[SfileadrL], *cpt;
|
char track_source[SfileadrL], sfe[5*SfileadrL], dev_adr[SfileadrL], *cpt;
|
||||||
char mem_report_about_text[80], *report_about= "SORRY", blank_mode[80];
|
char mem_report_about_text[80], *report_about= "SORRY", blank_mode[80];
|
||||||
char speed[80];
|
char speed[80];
|
||||||
@ -7127,8 +7128,11 @@ int Xorriso_cdrskin(struct XorrisO *xorriso, char *whom, int argc, char **argv,
|
|||||||
"\tblank=type\tblank a CD-RW disc (see blank=help)",
|
"\tblank=type\tblank a CD-RW disc (see blank=help)",
|
||||||
"\tfs=#\t\tSet fifo size to # (0 to disable, default is 4 MB)",
|
"\tfs=#\t\tSet fifo size to # (0 to disable, default is 4 MB)",
|
||||||
"\t-eject\t\teject the disk after doing the work",
|
"\t-eject\t\teject the disk after doing the work",
|
||||||
|
"\t-dummy\t\tdo everything with laser turned off",
|
||||||
|
"\t-msinfo\t\tretrieve multi-session info for mkisofs >= 1.10",
|
||||||
"\t-toc\t\tretrieve and print TOC/PMA data",
|
"\t-toc\t\tretrieve and print TOC/PMA data",
|
||||||
"\t-atip\t\tretrieve media state, print \"Is *erasable\"",
|
"\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",
|
"\t-waiti\t\twait until input is available before opening SCSI",
|
||||||
"\tpadsize=#\tAmount of padding",
|
"\tpadsize=#\tAmount of padding",
|
||||||
"\t-data\t\tSubsequent tracks are CD-ROM data mode 1 (default)",
|
"\t-data\t\tSubsequent tracks are CD-ROM data mode 1 (default)",
|
||||||
@ -7166,7 +7170,7 @@ static char blank_help[][80]= {
|
|||||||
speed[0]= 0;
|
speed[0]= 0;
|
||||||
|
|
||||||
if(xorriso->in_drive_handle != NULL) {
|
if(xorriso->in_drive_handle != NULL) {
|
||||||
ret= Xorriso_option_dev(xorriso, "", 1); /* give up indev */
|
ret= Xorriso_option_dev(xorriso, "", 1|32); /* give up indev */
|
||||||
if(ret!=1)
|
if(ret!=1)
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
@ -7271,26 +7275,23 @@ no_volunteer:;
|
|||||||
speed[79]= 0;
|
speed[79]= 0;
|
||||||
} else if(strcmp(argv[i], "-multi")==0) {
|
} else if(strcmp(argv[i], "-multi")==0) {
|
||||||
|
|
||||||
/* >>> MULTI : allow -multi */
|
/* MULTI : allow -multi */
|
||||||
|
/*
|
||||||
sprintf(xorriso->info_text, "-as %s: Option -multi not supported.", whom);
|
sprintf(xorriso->info_text, "-as %s: Option -multi not supported.", whom);
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
ret= 0; goto ex;
|
ret= 0; goto ex;
|
||||||
|
*/
|
||||||
|
do_multi= 1;
|
||||||
|
|
||||||
} else if(strcmp(argv[i], "-msinfo")==0) {
|
} else if(strcmp(argv[i], "-msinfo")==0) {
|
||||||
|
|
||||||
/* >>> MULTI : allow -msinfo */
|
/* MULTI : allow -msinfo */
|
||||||
|
/*
|
||||||
sprintf(xorriso->info_text, "-as %s: Option -msinfo not supported.",whom);
|
sprintf(xorriso->info_text, "-as %s: Option -msinfo not supported.",whom);
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
ret= 0; goto ex;
|
ret= 0; goto ex;
|
||||||
|
*/
|
||||||
|
do_msinfo= 1;
|
||||||
/* >>> MULTI : allow --grow_overwriteable_iso */
|
|
||||||
|
|
||||||
/* >>> MULTI : allow write_start_address= */
|
|
||||||
/* >>> MULTI : combine write_start_address=32 with --grow_overwriteable_iso */
|
|
||||||
/* >>> MULTI : ??? how about cdrskin. shouldn't it combine too ? */
|
|
||||||
|
|
||||||
} else if(strcmp(argv[i], "--devices")==0) {
|
} else if(strcmp(argv[i], "--devices")==0) {
|
||||||
do_scanbus= 2;
|
do_scanbus= 2;
|
||||||
} else if(strcmp(argv[i], "-scanbus")==0) {
|
} else if(strcmp(argv[i], "-scanbus")==0) {
|
||||||
@ -7303,11 +7304,19 @@ no_volunteer:;
|
|||||||
} else if(strcmp(argv[i], "-toc")==0) {
|
} else if(strcmp(argv[i], "-toc")==0) {
|
||||||
do_toc= 1;
|
do_toc= 1;
|
||||||
} else if(strcmp(argv[i], "--grow_overwriteable_iso")==0) {
|
} else if(strcmp(argv[i], "--grow_overwriteable_iso")==0) {
|
||||||
|
|
||||||
|
/* >>> MULTI : allow --grow_overwriteable_iso */
|
||||||
|
|
||||||
sprintf(xorriso->info_text,
|
sprintf(xorriso->info_text,
|
||||||
"-as %s: Option --grow_overwriteable_iso not supported.",
|
"-as %s: Option --grow_overwriteable_iso not supported.",
|
||||||
whom);
|
whom);
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
ret= 0; goto ex;
|
ret= 0; goto ex;
|
||||||
|
|
||||||
|
/* >>> MULTI : allow write_start_address= */
|
||||||
|
/* >>> MULTI : combine write_start_address=32 with --grow_overwriteable_iso */
|
||||||
|
/* >>> MULTI : ??? how about cdrskin. shouldn't it combine too ? */
|
||||||
|
|
||||||
} else if(strcmp(argv[i], "-v")==0 || strcmp(argv[i],"-verbose")==0) {
|
} else if(strcmp(argv[i], "-v")==0 || strcmp(argv[i],"-verbose")==0) {
|
||||||
do_verbous++;
|
do_verbous++;
|
||||||
} else if(strcmp(argv[i], "-vv")==0) {
|
} else if(strcmp(argv[i], "-vv")==0) {
|
||||||
@ -7363,7 +7372,13 @@ no_volunteer:;
|
|||||||
sprintf(xorriso->info_text, "xorriso: Option -waiti pausing is done.\n");
|
sprintf(xorriso->info_text, "xorriso: Option -waiti pausing is done.\n");
|
||||||
}
|
}
|
||||||
if(dev_adr[0]) {
|
if(dev_adr[0]) {
|
||||||
ret= Xorriso_option_dev(xorriso, dev_adr, 2|8); /* overwriteables as blank */
|
|
||||||
|
/* >>> MULTI :
|
||||||
|
if grow_overwriteable_iso :
|
||||||
|
consider overwriteables with ISO as appendable */
|
||||||
|
/* bit3= overwriteables as blank */
|
||||||
|
|
||||||
|
ret= Xorriso_option_dev(xorriso, dev_adr, 2|8|32);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
goto ex;
|
goto ex;
|
||||||
}
|
}
|
||||||
@ -7391,7 +7406,7 @@ no_volunteer:;
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!(do_checkdrive || do_atip || do_toc || blank_mode[0] || track_source[0] ||
|
if(!(do_checkdrive || do_atip || do_toc || blank_mode[0] || track_source[0] ||
|
||||||
do_eject))
|
do_eject || do_msinfo))
|
||||||
{ret= 1; goto ex;}
|
{ret= 1; goto ex;}
|
||||||
|
|
||||||
if(xorriso->out_drive_handle==NULL) {
|
if(xorriso->out_drive_handle==NULL) {
|
||||||
@ -7400,6 +7415,15 @@ no_volunteer:;
|
|||||||
ret= 0; goto ex;
|
ret= 0; goto ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* MULTI : perform -msinfo */
|
||||||
|
if(do_msinfo) {
|
||||||
|
ret= Xorriso_msinfo(xorriso, &msc1, &msc2, 2);
|
||||||
|
if(ret<=0)
|
||||||
|
goto ex;
|
||||||
|
sprintf(xorriso->result_line, "%d,%d\n", msc1, msc2);
|
||||||
|
Xorriso_result(xorriso, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if(speed[0]) {
|
if(speed[0]) {
|
||||||
ret= Xorriso_option_speed(xorriso, speed, 0);
|
ret= Xorriso_option_speed(xorriso, speed, 0);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
@ -7442,9 +7466,9 @@ no_volunteer:;
|
|||||||
}
|
}
|
||||||
if(track_source[0]) {
|
if(track_source[0]) {
|
||||||
|
|
||||||
/* >>> MULTI : do not close if -multi */
|
/* MULTI : do not close if -multi */
|
||||||
|
|
||||||
xorriso->do_close= 1;
|
xorriso->do_close= !do_multi;
|
||||||
ret= Xorriso_burn_track(xorriso, track_source, 0);
|
ret= Xorriso_burn_track(xorriso, track_source, 0);
|
||||||
aq_ret= Xorriso_reaquire_outdev(xorriso, 2*(ret>0));
|
aq_ret= Xorriso_reaquire_outdev(xorriso, 2*(ret>0));
|
||||||
if(ret<=0 && ret<aq_ret)
|
if(ret<=0 && ret<aq_ret)
|
||||||
@ -9156,6 +9180,7 @@ int Xorriso_option_cut_out(struct XorrisO *xorriso, char *disk_path,
|
|||||||
bit3= regard overwriteable media as blank
|
bit3= regard overwriteable media as blank
|
||||||
bit4= if the drive is a regular disk file: truncate it to
|
bit4= if the drive is a regular disk file: truncate it to
|
||||||
the write start address
|
the write start address
|
||||||
|
bit5= do not print toc of aquired drive
|
||||||
@return <=0 error , 1 success, 2 revoked by -reassure
|
@return <=0 error , 1 success, 2 revoked by -reassure
|
||||||
*/
|
*/
|
||||||
int Xorriso_option_dev(struct XorrisO *xorriso, char *in_adr, int flag)
|
int Xorriso_option_dev(struct XorrisO *xorriso, char *in_adr, int flag)
|
||||||
@ -9213,9 +9238,9 @@ int Xorriso_option_dev(struct XorrisO *xorriso, char *in_adr, int flag)
|
|||||||
Text_shellsafe(xorriso->outdev, sfe, 0));
|
Text_shellsafe(xorriso->outdev, sfe, 0));
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||||
}
|
}
|
||||||
ret= Xorriso_give_up_drive(xorriso, flag&3);
|
ret= Xorriso_give_up_drive(xorriso, (flag&3)|((flag&32)>>2));
|
||||||
} else
|
} else
|
||||||
ret= Xorriso_aquire_drive(xorriso, adr, (flag&3)|((flag&(8|16))>>1));
|
ret= Xorriso_aquire_drive(xorriso, adr, (flag&(3|32))|(((flag&(8|16))>>1)));
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
return(ret);
|
return(ret);
|
||||||
if(xorriso->in_drive_handle == NULL)
|
if(xorriso->in_drive_handle == NULL)
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2008.07.09.155540"
|
#define Xorriso_timestamP "2008.07.10.141731"
|
||||||
|
@ -409,6 +409,7 @@ int Xorriso_create_empty_iso(struct XorrisO *xorriso, int flag)
|
|||||||
bit2= regard overwriteable media as blank
|
bit2= regard overwriteable media as blank
|
||||||
bit3= if the drive is a regular disk file: truncate it to
|
bit3= if the drive is a regular disk file: truncate it to
|
||||||
the write start address
|
the write start address
|
||||||
|
bit5= do not print toc
|
||||||
@return <=0 failure , 1= ok
|
@return <=0 failure , 1= ok
|
||||||
2=success, but not writeable with bit1
|
2=success, but not writeable with bit1
|
||||||
3=success, but not blank and not ISO with bit0
|
3=success, but not blank and not ISO with bit0
|
||||||
@ -534,7 +535,8 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
|||||||
{ret= -1; goto ex;}
|
{ret= -1; goto ex;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Xorriso_toc(xorriso, 1|2);
|
if(!(flag&32))
|
||||||
|
Xorriso_toc(xorriso, 1|2);
|
||||||
{ret= 1+not_writeable; goto ex;}
|
{ret= 1+not_writeable; goto ex;}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -578,7 +580,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
|||||||
if(ret<=0) {
|
if(ret<=0) {
|
||||||
Xorriso_process_msg_queues(xorriso,0);
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
Xorriso_set_image_severities(xorriso, 0);
|
Xorriso_set_image_severities(xorriso, 0);
|
||||||
Xorriso_give_up_drive(xorriso, 1);
|
Xorriso_give_up_drive(xorriso, 1|((flag&32)>>2));
|
||||||
sprintf(xorriso->info_text,"Cannot read ISO image tree");
|
sprintf(xorriso->info_text,"Cannot read ISO image tree");
|
||||||
sev= "FAILURE";
|
sev= "FAILURE";
|
||||||
if(xorriso->img_read_error_mode==2)
|
if(xorriso->img_read_error_mode==2)
|
||||||
@ -618,22 +620,24 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
|||||||
boot_fate);
|
boot_fate);
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||||
}
|
}
|
||||||
|
if(!(flag&32)) {
|
||||||
Xorriso_toc(xorriso, 1);
|
Xorriso_toc(xorriso, 1);
|
||||||
if(xorriso->loaded_volid[0]!=0) {
|
if(xorriso->loaded_volid[0]!=0) {
|
||||||
sprintf(xorriso->result_line,"Volume id : '%s'\n",xorriso->loaded_volid);
|
sprintf(xorriso->result_line,"Volume id : '%s'\n",
|
||||||
Xorriso_result(xorriso,0);
|
xorriso->loaded_volid);
|
||||||
if(strcmp(xorriso->loaded_volid, xorriso->volid)!=0 &&
|
|
||||||
!xorriso->volid_default) {
|
|
||||||
sprintf(xorriso->result_line, "New volume id: '%s'\n", xorriso->volid);
|
|
||||||
Xorriso_result(xorriso,0);
|
Xorriso_result(xorriso,0);
|
||||||
|
if(strcmp(xorriso->loaded_volid, xorriso->volid)!=0 &&
|
||||||
|
!xorriso->volid_default) {
|
||||||
|
sprintf(xorriso->result_line, "New volume id: '%s'\n", xorriso->volid);
|
||||||
|
Xorriso_result(xorriso,0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret= 1+not_writeable;
|
ret= 1+not_writeable;
|
||||||
ex:
|
ex:
|
||||||
Xorriso_process_msg_queues(xorriso,0);
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
if(ret<=0) {
|
if(ret<=0) {
|
||||||
hret= Xorriso_give_up_drive(xorriso, flag&3);
|
hret= Xorriso_give_up_drive(xorriso, (flag&3)|((flag&32)>>2));
|
||||||
if(hret<ret)
|
if(hret<ret)
|
||||||
ret= hret;
|
ret= hret;
|
||||||
}
|
}
|
||||||
@ -812,7 +816,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
|||||||
int ret, relax= 0, i, profile, status, num_formats;
|
int ret, relax= 0, i, profile, status, num_formats;
|
||||||
int major, minor, micro;
|
int major, minor, micro;
|
||||||
unsigned dummy;
|
unsigned dummy;
|
||||||
char xorriso_id[256], *img_id, profile_name[80];
|
char xorriso_id[256], *img_id, profile_name[80], sfe[5*SfileadrL];
|
||||||
struct isoburn_imgen_opts *sopts= NULL;
|
struct isoburn_imgen_opts *sopts= NULL;
|
||||||
struct burn_drive_info *dinfo, *source_dinfo;
|
struct burn_drive_info *dinfo, *source_dinfo;
|
||||||
struct burn_drive *drive, *source_drive;
|
struct burn_drive *drive, *source_drive;
|
||||||
@ -1037,7 +1041,8 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
|||||||
isoburn_sync_after_write(source_drive, drive, 0);
|
isoburn_sync_after_write(source_drive, drive, 0);
|
||||||
Xorriso_process_msg_queues(xorriso,0);
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
|
|
||||||
sprintf(xorriso->info_text, "Writing completed sucessfully.\n\n");
|
sprintf(xorriso->info_text, "Writing to %s completed sucessfully.\n\n",
|
||||||
|
Text_shellsafe(xorriso->outdev,sfe,0));
|
||||||
Xorriso_info(xorriso, 0);
|
Xorriso_info(xorriso, 0);
|
||||||
ret= 1;
|
ret= 1;
|
||||||
ex:;
|
ex:;
|
||||||
@ -5958,7 +5963,9 @@ int Xorriso_burn_track(struct XorrisO *xorriso, char *track_source, int flag)
|
|||||||
session= burn_session_create();
|
session= burn_session_create();
|
||||||
ret= burn_disc_add_session(disc,session,BURN_POS_END);
|
ret= burn_disc_add_session(disc,session,BURN_POS_END);
|
||||||
if(ret==0) {
|
if(ret==0) {
|
||||||
|
|
||||||
/* >>> */;
|
/* >>> */;
|
||||||
|
|
||||||
goto ex;
|
goto ex;
|
||||||
}
|
}
|
||||||
track= burn_track_create();
|
track= burn_track_create();
|
||||||
@ -5999,20 +6006,34 @@ int Xorriso_burn_track(struct XorrisO *xorriso, char *track_source, int flag)
|
|||||||
burn_session_add_track(session, track, BURN_POS_END);
|
burn_session_add_track(session, track, BURN_POS_END);
|
||||||
burn_source_free(data_src);
|
burn_source_free(data_src);
|
||||||
|
|
||||||
|
/* >>> MULTI :
|
||||||
|
if grow_overwriteable_iso:
|
||||||
|
consider overwriteables with ISO as appendable
|
||||||
|
*/
|
||||||
|
|
||||||
disc_state = burn_disc_get_status(drive);
|
disc_state = burn_disc_get_status(drive);
|
||||||
if(disc_state == BURN_DISC_BLANK) {
|
if(disc_state == BURN_DISC_BLANK) {
|
||||||
/* ok */;
|
/* ok */;
|
||||||
} else if(disc_state == BURN_DISC_APPENDABLE) {
|
} else if(disc_state == BURN_DISC_APPENDABLE) {
|
||||||
|
|
||||||
|
/* MULTI : allow appendable media */
|
||||||
|
/* ok */;
|
||||||
|
/*
|
||||||
if(!isoburn_needs_emulation(drive)) {
|
if(!isoburn_needs_emulation(drive)) {
|
||||||
sprintf(xorriso->info_text,
|
sprintf(xorriso->info_text,
|
||||||
"Appendable media with data detected. Need blank media.");
|
"Appendable media with data detected. Need blank media.");
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
ret= 0; goto ex;
|
ret= 0; goto ex;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if(disc_state == BURN_DISC_FULL) {
|
if(disc_state == BURN_DISC_FULL) {
|
||||||
|
|
||||||
|
/* MULTI */
|
||||||
|
|
||||||
sprintf(xorriso->info_text,
|
sprintf(xorriso->info_text,
|
||||||
"Closed media with data detected. Need blank media.");
|
"Closed media with data detected. Need blank or appendable media.");
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
if(burn_disc_erasable(drive)) {
|
if(burn_disc_erasable(drive)) {
|
||||||
sprintf(xorriso->info_text, "Try --blank_fast\n");
|
sprintf(xorriso->info_text, "Try --blank_fast\n");
|
||||||
@ -6040,6 +6061,10 @@ int Xorriso_burn_track(struct XorrisO *xorriso, char *track_source, int flag)
|
|||||||
|
|
||||||
ret= Xorriso_get_profile(xorriso, &profile_number, profile_name, 2);
|
ret= Xorriso_get_profile(xorriso, &profile_number, profile_name, 2);
|
||||||
is_cd= (ret==2);
|
is_cd= (ret==2);
|
||||||
|
|
||||||
|
/* >>> MULTI :
|
||||||
|
consider overwriteables as blank if not grow_overwriteable_iso*/
|
||||||
|
|
||||||
if(isoburn_needs_emulation(drive))
|
if(isoburn_needs_emulation(drive))
|
||||||
burn_write_opts_set_start_byte(burn_options, (off_t) 0);
|
burn_write_opts_set_start_byte(burn_options, (off_t) 0);
|
||||||
ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, 2);
|
ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, 2);
|
||||||
@ -6060,7 +6085,8 @@ int Xorriso_burn_track(struct XorrisO *xorriso, char *track_source, int flag)
|
|||||||
ret= 0; goto ex;
|
ret= 0; goto ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(xorriso->info_text, "Writing completed sucessfully.\n\n");
|
sprintf(xorriso->info_text, "Writing to %s completed sucessfully.\n\n",
|
||||||
|
Text_shellsafe(xorriso->outdev,sfe,0));
|
||||||
Xorriso_info(xorriso, 0);
|
Xorriso_info(xorriso, 0);
|
||||||
ret= 1;
|
ret= 1;
|
||||||
ex:;
|
ex:;
|
||||||
@ -6075,7 +6101,6 @@ ex:;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* @param flag bit1= outdev rather than indev
|
/* @param flag bit1= outdev rather than indev
|
||||||
@return <0 error, 0 = no profile to see , 1= ok , 2= ok, is CD profile
|
@return <0 error, 0 = no profile to see , 1= ok , 2= ok, is CD profile
|
||||||
*/
|
*/
|
||||||
@ -6369,3 +6394,48 @@ int Xorriso_libburn_adr(struct XorrisO *xorriso, char *path, char adr[],
|
|||||||
strcpy(adr, local_adr);
|
strcpy(adr, local_adr);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* MULTI : */
|
||||||
|
/* @param flag bit1= obtain info from outdev
|
||||||
|
*/
|
||||||
|
int Xorriso_msinfo(struct XorrisO *xorriso, int *msc1, int *msc2, int flag)
|
||||||
|
{
|
||||||
|
int ret, dummy;
|
||||||
|
struct burn_drive *drive;
|
||||||
|
struct burn_drive_info *dinfo;
|
||||||
|
enum burn_disc_status disc_state;
|
||||||
|
|
||||||
|
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
|
||||||
|
"on attempt to obtain msinfo", flag&2);
|
||||||
|
if(ret<=0)
|
||||||
|
return(ret);
|
||||||
|
/* >>> if grow_overwriteable_iso :
|
||||||
|
inquire by isoburn_disc_get_status()
|
||||||
|
*/;
|
||||||
|
disc_state = burn_disc_get_status(drive);
|
||||||
|
if(disc_state != BURN_DISC_APPENDABLE) {
|
||||||
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
|
sprintf(xorriso->info_text,
|
||||||
|
"%s media is not appendable. Cannot obtain -msinfo.",
|
||||||
|
(flag&2) ? "Output" : "Input");
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
ret= isoburn_disc_get_msc1(drive, msc1);
|
||||||
|
if(ret<=0) {
|
||||||
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
|
sprintf(xorriso->info_text, "Cannot obtain address of most recent session");
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
ret= isoburn_disc_track_lba_nwa(drive, NULL, 0, &dummy, msc2);
|
||||||
|
if(ret<0) {
|
||||||
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
|
sprintf(xorriso->info_text, "Cannot obtain next writeable address on media");
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -269,5 +269,10 @@ int Xorriso_libburn_adr(struct XorrisO *xorriso, char *address_string,
|
|||||||
char official_adr[], int flag);
|
char official_adr[], int flag);
|
||||||
|
|
||||||
|
|
||||||
|
/* @param flag bit1= obtain info from outdev
|
||||||
|
*/
|
||||||
|
int Xorriso_msinfo(struct XorrisO *xorriso, int *msc1, int *msc2, int flag);
|
||||||
|
|
||||||
|
|
||||||
#endif /* Xorrisoburn_includeD */
|
#endif /* Xorrisoburn_includeD */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user