Improved error messages if DVD-RW media can only be written with -close on

This commit is contained in:
Thomas Schmitt 2011-05-29 10:01:56 +00:00
parent 96cc0a529c
commit f319668212
5 changed files with 119 additions and 49 deletions

View File

@ -58,6 +58,60 @@
#include "write_run.h" #include "write_run.h"
/* @param flag bit0= talk of -as cdrecord -multi rather than of -close
*/
int Xorriso_check_multi(struct XorrisO *xorriso, struct burn_drive *drive,
int flag)
{
int profile_no= 0, ret;
struct burn_multi_caps *caps= NULL;
char profile_name[80];
if(!xorriso->do_close) {
burn_disc_get_profile(drive, &profile_no, profile_name);
if(profile_no == 0x14) { /* DVD-RW sequential */
ret= burn_disc_get_multi_caps(drive, BURN_WRITE_TAO, &caps, 0);
if(caps != NULL)
burn_disc_free_multi_caps(&caps);
if(ret == 0) {
if(flag & 1) {
sprintf(xorriso->info_text,
"This DVD-RW media can only be written without option -multi");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
sprintf(xorriso->info_text,
"Possibly it was blanked by blank=deformat_quickest");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
sprintf(xorriso->info_text,
"After writing a session without -multi, apply blank=all");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
} else {
sprintf(xorriso->info_text,
"This DVD-RW media can only be written with -close \"on\"");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
sprintf(xorriso->info_text,
"Possibly it was blanked by -blank \"deformat_quickest\"");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
sprintf(xorriso->info_text,
"After writing a session with -closed \"on\", apply -blank \"all\"");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
}
return(0);
}
} else if(profile_no == 0x15) { /* DVD-RW DL */
if(flag & 1)
sprintf(xorriso->info_text,
"DVD-R DL media can only be written without option -multi");
else
sprintf(xorriso->info_text,
"DVD-R DL media can only be written with -close \"on\"");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
}
return(1);
}
int Xorriso_make_write_options( int Xorriso_make_write_options(
struct XorrisO *xorriso, struct burn_drive *drive, struct XorrisO *xorriso, struct burn_drive *drive,
struct burn_write_opts **burn_options, int flag) struct burn_write_opts **burn_options, int flag)
@ -634,6 +688,10 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
else if(ret == 3) else if(ret == 3)
pacifier_speed= 2; pacifier_speed= 2;
ret= Xorriso_check_multi(xorriso, drive, 0);
if(ret<=0)
goto ex;
ret= isoburn_igopt_new(&sopts, 0); ret= isoburn_igopt_new(&sopts, 0);
if(ret<=0) { if(ret<=0) {
Xorriso_process_msg_queues(xorriso, 0); Xorriso_process_msg_queues(xorriso, 0);
@ -1668,6 +1726,10 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
"on attempt to burn track", 2); "on attempt to burn track", 2);
if(ret<=0) if(ret<=0)
{ret= 0; goto ex;} {ret= 0; goto ex;}
ret= Xorriso_check_multi(xorriso, drive, 1);
if(ret<=0)
goto ex;
ret= Xorriso_make_write_options(xorriso, drive, &burn_options, 0); ret= Xorriso_make_write_options(xorriso, drive, &burn_options, 0);
if(ret<=0) if(ret<=0)
goto ex; goto ex;

View File

@ -9,7 +9,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 "Version 1.0.9, May 16, 2011" .TH XORRISO 1 "Version 1.0.9, May 29, 2011"
.\" 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:
@ -1978,7 +1978,10 @@ overwriteable ISO images. "all" might work more thoroughly and need more time.
.br .br
"deformat_quickest" is a faster way to deformat or blank DVD\-RW "deformat_quickest" is a faster way to deformat or blank DVD\-RW
but produces media which are only suitable for a single session. but produces media which are only suitable for a single session.
\fBxorriso\fR will write onto them only if option \-close is set to "on". Some drives announce this state by not offering feature 21h,
but some drives offer it anyway.
If feature 21h is missing, then \fBxorriso\fR
will refuse to write on DVD\-RW if not option \-close is set to "on".
.br .br
The progress reports issued by some drives while blanking are The progress reports issued by some drives while blanking are
quite unrealistic. Do not conclude success or failure from the quite unrealistic. Do not conclude success or failure from the

View File

@ -1769,8 +1769,10 @@ File: xorriso.info, Node: Writing, Next: SetWrite, Prev: Filter, Up: Options
"deformat" converts overwriteable DVD-RW into unformatted ones. "deformat" converts overwriteable DVD-RW into unformatted ones.
"deformat_quickest" is a faster way to deformat or blank DVD-RW "deformat_quickest" is a faster way to deformat or blank DVD-RW
but produces media which are only suitable for a single session. but produces media which are only suitable for a single session.
`xorriso' will write onto them only if option -close is set to Some drives announce this state by not offering feature 21h, but
"on". some drives offer it anyway. If feature 21h is missing, then
`xorriso' will refuse to write on DVD-RW if not option -close is
set to "on".
The progress reports issued by some drives while blanking are The progress reports issued by some drives while blanking are
quite unrealistic. Do not conclude success or failure from the quite unrealistic. Do not conclude success or failure from the
reported percentages. Blanking was successful if no SORRY event or reported percentages. Blanking was successful if no SORRY event or
@ -4234,7 +4236,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -findx traverses disk tree: Navigate. (line 105) * -findx traverses disk tree: Navigate. (line 105)
* -follow softlinks and mount points: SetInsert. (line 76) * -follow softlinks and mount points: SetInsert. (line 76)
* -for_backup -acl,-xattr,-hardlinks,-md5: Loading. (line 184) * -for_backup -acl,-xattr,-hardlinks,-md5: Loading. (line 184)
* -format formats media: Writing. (line 70) * -format formats media: Writing. (line 72)
* -fs sets size of fifo: SetWrite. (line 255) * -fs sets size of fifo: SetWrite. (line 255)
* -getfacl shows ACL in ISO image: Navigate. (line 69) * -getfacl shows ACL in ISO image: Navigate. (line 69)
* -getfacl_r shows ACL in ISO image: Navigate. (line 76) * -getfacl_r shows ACL in ISO image: Navigate. (line 76)
@ -4252,8 +4254,8 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -jigdo clears JTE or or adds parameter to JTE: Jigdo. (line 34) * -jigdo clears JTE or or adds parameter to JTE: Jigdo. (line 34)
* -joliet enables production of Joliet tree: SetWrite. (line 10) * -joliet enables production of Joliet tree: SetWrite. (line 10)
* -list_delimiter replaces '--': Scripting. (line 42) * -list_delimiter replaces '--': Scripting. (line 42)
* -list_formats lists available formats: Writing. (line 108) * -list_formats lists available formats: Writing. (line 110)
* -list_profiles lists supported media: Writing. (line 120) * -list_profiles lists supported media: Writing. (line 122)
* -load addresses a particular session as input: Loading. (line 11) * -load addresses a particular session as input: Loading. (line 11)
* -local_charset sets terminal character set: Charset. (line 47) * -local_charset sets terminal character set: Charset. (line 47)
* -logfile logs output channels to file: Frontend. (line 20) * -logfile logs output channels to file: Frontend. (line 20)
@ -4416,7 +4418,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Drive, for input, -indev: AqDrive. (line 22) * Drive, for input, -indev: AqDrive. (line 22)
* Drive, for output, -outdev: AqDrive. (line 29) * Drive, for output, -outdev: AqDrive. (line 29)
* Drive, get drive list, -devices: Inquiry. (line 7) * Drive, get drive list, -devices: Inquiry. (line 7)
* Drive, list supported media, -list_profiles: Writing. (line 120) * Drive, list supported media, -list_profiles: Writing. (line 122)
* Drive, reduce activity, -calm_drive: Loading. (line 235) * Drive, reduce activity, -calm_drive: Loading. (line 235)
* Drive, report SCSI commands, -scsi_log: Scripting. (line 125) * Drive, report SCSI commands, -scsi_log: Scripting. (line 125)
* Drive, write and eject, -commit_eject: Writing. (line 40) * Drive, write and eject, -commit_eject: Writing. (line 40)
@ -4486,8 +4488,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* MBR, set, -boot_image system_area=: Bootable. (line 123) * MBR, set, -boot_image system_area=: Bootable. (line 123)
* MD5, control handling, -md5: Loading. (line 155) * MD5, control handling, -md5: Loading. (line 155)
* Media, erase, -blank: Writing. (line 45) * Media, erase, -blank: Writing. (line 45)
* Media, format, -format: Writing. (line 70) * Media, format, -format: Writing. (line 72)
* Media, list formats, -list_formats: Writing. (line 108) * Media, list formats, -list_formats: Writing. (line 110)
* MIPS boot file, activation: Bootable. (line 178) * MIPS boot file, activation: Bootable. (line 178)
* mkisofs, Emulation: Emulation. (line 16) * mkisofs, Emulation: Emulation. (line 16)
* Modifying, _definition: Methods. (line 27) * Modifying, _definition: Methods. (line 27)
@ -4632,41 +4634,41 @@ Node: Manip60375
Node: CmdFind69060 Node: CmdFind69060
Node: Filter80363 Node: Filter80363
Node: Writing84720 Node: Writing84720
Node: SetWrite91018 Node: SetWrite91164
Node: Bootable105064 Node: Bootable105210
Node: Jigdo118384 Node: Jigdo118530
Node: Charset122648 Node: Charset122794
Node: Exception125407 Node: Exception125553
Node: DialogCtl131547 Node: DialogCtl131693
Node: Inquiry134134 Node: Inquiry134280
Node: Navigate138517 Node: Navigate138663
Node: Verify146457 Node: Verify146603
Node: Restore155052 Node: Restore155198
Node: Emulation161712 Node: Emulation161858
Node: Scripting171585 Node: Scripting171731
Node: Frontend177735 Node: Frontend177881
Node: Examples179034 Node: Examples179180
Node: ExDevices180205 Node: ExDevices180351
Node: ExCreate180843 Node: ExCreate180989
Node: ExDialog182117 Node: ExDialog182263
Node: ExGrowing183379 Node: ExGrowing183525
Node: ExModifying184181 Node: ExModifying184327
Node: ExBootable184682 Node: ExBootable184828
Node: ExCharset185231 Node: ExCharset185377
Node: ExPseudo186059 Node: ExPseudo186205
Node: ExCdrecord186957 Node: ExCdrecord187103
Node: ExMkisofs187272 Node: ExMkisofs187418
Node: ExGrowisofs188610 Node: ExGrowisofs188756
Node: ExException189745 Node: ExException189891
Node: ExTime190199 Node: ExTime190345
Node: ExIncBackup190658 Node: ExIncBackup190804
Node: ExRestore194582 Node: ExRestore194728
Node: ExRecovery195551 Node: ExRecovery195697
Node: Files196117 Node: Files196263
Node: Seealso197415 Node: Seealso197561
Node: Bugreport198003 Node: Bugreport198149
Node: Legal198584 Node: Legal198730
Node: CommandIdx199514 Node: CommandIdx199660
Node: ConceptIdx214182 Node: ConceptIdx214328
 
End Tag Table End Tag Table

View File

@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps @c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection @c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1) @c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO 1 "Version 1.0.9, May 16, 2011" @c man .TH XORRISO 1 "Version 1.0.9, May 29, 2011"
@c man .\" Please adjust this date whenever revising the manpage. @c man .\" Please adjust this date whenever revising the manpage.
@c man .\" @c man .\"
@c man .\" Some roff macros, for reference: @c man .\" Some roff macros, for reference:
@ -2384,7 +2384,10 @@ overwriteable ISO images. "all" might work more thoroughly and need more time.
@* @*
"deformat_quickest" is a faster way to deformat or blank DVD-RW "deformat_quickest" is a faster way to deformat or blank DVD-RW
but produces media which are only suitable for a single session. but produces media which are only suitable for a single session.
@command{xorriso} will write onto them only if option -close is set to "on". Some drives announce this state by not offering feature 21h,
but some drives offer it anyway.
If feature 21h is missing, then @command{xorriso}
will refuse to write on DVD-RW if not option -close is set to "on".
@* @*
The progress reports issued by some drives while blanking are The progress reports issued by some drives while blanking are
quite unrealistic. Do not conclude success or failure from the quite unrealistic. Do not conclude success or failure from the

View File

@ -1 +1 @@
#define Xorriso_timestamP "2011.05.29.095524" #define Xorriso_timestamP "2011.05.29.100055"