From d919d809fcfd4df98c2ac589fb4176ad49d6e24f Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 23 May 2010 07:27:09 +0000 Subject: [PATCH] New -compliance rule no_emul_toc --- libisoburn/trunk/xorriso/base_obj.c | 1 + libisoburn/trunk/xorriso/write_run.c | 15 ++++++++++++++- libisoburn/trunk/xorriso/xorriso_private.h | 4 ++++ libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/libisoburn/trunk/xorriso/base_obj.c b/libisoburn/trunk/xorriso/base_obj.c index 671a0c21..d2bf7d7b 100644 --- a/libisoburn/trunk/xorriso/base_obj.c +++ b/libisoburn/trunk/xorriso/base_obj.c @@ -106,6 +106,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag) m->do_joliet= 0; m->do_aaip= 0; m->do_md5= 0; + m->no_emul_toc= 0; m->scdbackup_tag_name[0]= 0; m->scdbackup_tag_time[0]= 0; m->scdbackup_tag_written[0]= 0; diff --git a/libisoburn/trunk/xorriso/write_run.c b/libisoburn/trunk/xorriso/write_run.c index 0eeacf1c..5fd688a5 100644 --- a/libisoburn/trunk/xorriso/write_run.c +++ b/libisoburn/trunk/xorriso/write_run.c @@ -668,6 +668,8 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag) ((!!(xorriso->do_md5 & 2)) * isoburn_igopt_session_md5) | ((!!(xorriso->do_md5 & 4)) * isoburn_igopt_file_md5) | ((!!(xorriso->do_md5 & 8)) * isoburn_igopt_file_stability); + if(xorriso->no_emul_toc & 1) + ext|= isoburn_igopt_no_emul_toc; isoburn_igopt_set_extensions(sopts, ext); isoburn_igopt_set_relaxed(sopts, relax); isoburn_igopt_set_sort_files(sopts, 1); @@ -1690,6 +1692,7 @@ ex:; return(ret); } + int Xorriso_relax_compliance(struct XorrisO *xorriso, char *mode, int flag) { @@ -1804,6 +1807,13 @@ int Xorriso_relax_compliance(struct XorrisO *xorriso, char *mode, (l == 14 && strncmp(cpt, "aaip_susp_1_12", l) == 0)) { xorriso->relax_compliance&= ~isoburn_igopt_aaip_susp_1_10; + } else if((l == 11 && strncmp(cpt, "no_emul_toc", l) == 0) || + (l == 14 && strncmp(cpt, "no_emul_toc_on", l) == 0)) { + xorriso->no_emul_toc|= 1; + } else if((l == 15 && strncmp(cpt, "no_emul_toc_off", l) == 0) || + (l == 8 && strncmp(cpt, "emul_toc", l) == 0)) { + xorriso->no_emul_toc&= ~1; + } else if((l == 8 && strncmp(cpt, "iso_9660", l) == 0) || (l == 11 && strncmp(cpt, "iso_9660_on", l) == 0)) { /* may have a meaning in future */; @@ -1874,8 +1884,11 @@ int Xorriso_get_relax_text(struct XorrisO *xorriso, char mode[1024], if(r & isoburn_igopt_aaip_susp_1_10) strcat(mode, ":aaip_susp_1_10"); } + if(xorriso->no_emul_toc & 1) + strcat(mode, ":no_emul_toc"); - return(1 + (r == Xorriso_relax_compliance_defaulT)); + return(1 + + (r == Xorriso_relax_compliance_defaulT && !(xorriso->no_emul_toc & 1))); } diff --git a/libisoburn/trunk/xorriso/xorriso_private.h b/libisoburn/trunk/xorriso/xorriso_private.h index 95b2dff1..6a7c9915 100644 --- a/libisoburn/trunk/xorriso/xorriso_private.h +++ b/libisoburn/trunk/xorriso/xorriso_private.h @@ -125,6 +125,10 @@ struct XorrisO { /* the global context of xorriso */ bit4= use recorded MD5 as proxy of ISO file */ + int no_emul_toc; /* bit0= On overwriteables: + write first session to LBA 0 rather than 32. + */ + char scdbackup_tag_name[81]; char scdbackup_tag_time[19]; char scdbackup_tag_written[512]; diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index 14f784ca..c3bf969f 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2010.05.23.072450" +#define Xorriso_timestamP "2010.05.23.072616"