Changed newly introduced -rom_toc_scan nonrom_off to off:emul_off

This commit is contained in:
Thomas Schmitt 2008-10-08 13:59:37 +00:00
parent 8945bce9ff
commit a0972af58f
3 changed files with 38 additions and 27 deletions

View File

@ -532,7 +532,7 @@ until the next -dev or -indev. After the image has been loaded once, the
setting is valid for -rollback until next -dev or -indev, where it
will be reset to "auto".
.TP
\fB\-rom_toc_scan\fR "on"|"off"|"nonrom_on"|"nonrom_off"
\fB\-rom_toc_scan\fR "on"|"off"[:"emul_on"|"emul_off"]
Read-only drives do not tell the actual media type but show any media as
ROM (e.g. as DVD-ROM). The session history of MMC multi-session media might
be truncated to first and last session or even be completely false.
@ -546,10 +546,10 @@ to invalid addresses and thus ugly drive behavior.
Setting "on" enables that scan for alleged read-only media.
.br
On the other hand the emulation of session history on overwriteable media
can hamper reading of partly damaged media. Setting "nonrom_off" disables
can hamper reading of partly damaged media. Setting "off:emul_off" disables
the elsewise trustworthy table-of-content scan for those media.
.br
To be in effect, -rom_toc_scan settings have to be made before the -*dev
To be in effect, the -rom_toc_scan setting has to be made before the -*dev
command which aquires drive and media.
.TP
\fB\-ban_stdio_write\fR

View File

@ -5281,16 +5281,12 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
#endif /* Xorriso_with_readlinE */
is_default= !(xorriso->toc_emulation_flag&1);
sprintf(line,"-rom_toc_scan %s\n",
xorriso->toc_emulation_flag&1 ? "on" : "off");
is_default= (xorriso->toc_emulation_flag == 0);
sprintf(line,"-rom_toc_scan %s%s\n",
xorriso->toc_emulation_flag & 1 ? "on" : "off",
xorriso->toc_emulation_flag & 2 ? ":emul_off" : "");
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= !(xorriso->toc_emulation_flag&2);
sprintf(line,"-rom_toc_scan %s\n",
xorriso->toc_emulation_flag&2 ? "nonrom_off" : "nonrom_on");
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
Xorriso_status_result(xorriso, filter, fp, flag & 2);
adr_mode= xorriso->image_start_mode & 0xffff;
if(adr_mode>=0 && adr_mode<=max_load_mode) {
@ -11654,9 +11650,9 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" -load \"session\"|\"track\"|\"lba\"|\"sbsector\"|\"volid\"|\"auto\" id",
" Load a particular (outdated) ISO image from a -dev or",
" -indev which hosts more than one session.",
" -rom_toc_scan \"on\"|\"off\"|\"nonrom_on\"|\"nonrom_off\"",
" -rom_toc_scan \"on\"|\"off\"[:\"emul_on\"|\"emul_off\"]",
" Enable scanning for ISO sessions on read-only drives/media",
" resp. on overwriteable media.",
" resp. on overwriteable media with emulated TOC.",
" -ban_stdio_write",
" Allow for writing only the usage of optical drives.",
" -blank \"fast\"|\"all\"|\"deformat\"|\"deformat_quickest\"",
@ -13506,18 +13502,33 @@ int Xorriso_option_rollback(struct XorrisO *xorriso, int flag)
/* Option -rom_toc_scan */
int Xorriso_option_rom_toc_scan(struct XorrisO *xorriso, char *mode, int flag)
{
if(strcmp(mode, "off")==0)
xorriso->toc_emulation_flag&= ~1;
else if(strcmp(mode, "on")==0)
xorriso->toc_emulation_flag|= 1;
else if(strcmp(mode, "nonrom_off")==0)
xorriso->toc_emulation_flag|= 2;
else if(strcmp(mode, "nonrom_on")==0)
xorriso->toc_emulation_flag&= ~2;
else {
sprintf(xorriso->info_text, "-rom_toc_scan: unknown mode '%s'", mode);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
int l;
char *cpt, *npt;
xorriso->toc_emulation_flag= 0;
npt= cpt= mode;
for(cpt= mode; npt != NULL; cpt= npt + 1) {
npt= strchr(cpt,':');
if(npt==NULL)
l= strlen(cpt);
else
l= npt-cpt;
if(l==0)
goto unknown_mode;
if(strncmp(cpt, "off", l) == 0)
xorriso->toc_emulation_flag&= ~1;
else if(strncmp(cpt, "on", l) == 0)
xorriso->toc_emulation_flag|= 1;
else if(strncmp(cpt, "emul_off", l) == 0)
xorriso->toc_emulation_flag|= 2;
else if(strncmp(cpt, "emul_on", l) == 0)
xorriso->toc_emulation_flag&= ~2;
else {
unknown_mode:;
sprintf(xorriso->info_text, "-rom_toc_scan: unknown mode in '%s'", mode);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
}
return(1);
}

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.10.06.114845"
#define Xorriso_timestamP "2008.10.08.135848"