Ability to emulate a featured bug with mkisofs -C : read 16 block too early

This commit is contained in:
Thomas Schmitt 2008-07-17 11:07:42 +00:00
parent 4088bf38a6
commit 58ba5aeff6
3 changed files with 21 additions and 5 deletions

View File

@ -1427,6 +1427,8 @@ int isoburn_drive_set_msgs_submit(struct burn_drive *d,
} }
/* @param flag bit0= with adr_mode 3: adr_value might be 16 blocks too high
*/
int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value, int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
int flag) int flag)
{ {
@ -1498,7 +1500,14 @@ not_found:;
} else if(adr_mode==3) { } else if(adr_mode==3) {
o->fabricated_msc1= adr_num; o->fabricated_msc1= adr_num;
if((flag & 1) && o->fabricated_msc1 >= 16) {
/* MULTI : adr_num is possibly 16 blocks too high */;
ret= isoburn_read_iso_head(d, o->fabricated_msc1, &size,volid, 1|(1<<14));
if(ret==2)
o->fabricated_msc1-= 16;
}
} else if(adr_mode==4) { } else if(adr_mode==4) {
/* search for volume id that is equal to adr_value */ /* search for volume id that is equal to adr_value */
best_lba= -1; best_lba= -1;

View File

@ -433,7 +433,7 @@ int isoburn_disc_erasable(struct burn_drive *d);
void isoburn_disc_erase(struct burn_drive *drive, int fast); void isoburn_disc_erase(struct burn_drive *drive, int fast);
/** Program isoburn_disc_get_msc1() to return a fabricated value. /** Set up isoburn_disc_get_msc1() to return a fabricated value.
This makes only sense between aquiring the drive and reading the This makes only sense between aquiring the drive and reading the
image. After isoburn_read_image() it will confuse the coordination image. After isoburn_read_image() it will confuse the coordination
of libisoburn and libisofs. of libisoburn and libisofs.
@ -450,7 +450,11 @@ void isoburn_disc_erase(struct burn_drive *drive, int fast);
4= start lba of last session with volume id 4= start lba of last session with volume id
given by adr_value given by adr_value
@parm adr_value A string describing the value to be eventually used. @parm adr_value A string describing the value to be eventually used.
@param flag Bitfield for control purposes. Unused yet. Submit 0. @param flag Bitfield for control purposes.
bit0= @since 0.2.2
with adr_mode 3: adr_value might be 16 blocks too high
(e.g. -C stemming from growisofs). Probe for ISO head
at adr_value-16 and eventually adjust setting.
*/ */
int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value, int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
int flag); int flag);
@ -570,7 +574,7 @@ void isoburn_toc_track_get_entry(struct isoburn_toc_track *t,
void isoburn_toc_disc_free(struct isoburn_toc_disc *disc); void isoburn_toc_disc_free(struct isoburn_toc_disc *disc);
/** Try whether at the data at the given address look like a ISO 9660 /** Try whether the data at the given address look like a ISO 9660
image header and obtain its alleged size. Depending on the info mode image header and obtain its alleged size. Depending on the info mode
one other string of text information can be retrieved too. one other string of text information can be retrieved too.
@since 0.1.6 @since 0.1.6
@ -588,7 +592,7 @@ void isoburn_toc_disc_free(struct isoburn_toc_disc *disc);
bit14= check both half buffers (not only second) bit14= check both half buffers (not only second)
return 2 if found in first block return 2 if found in first block
bit15= return-1 on read error bit15= return-1 on read error
@return 1 seems to be a valid ISO image , 0 format not recognized, <0 error @return >0 seems to be a valid ISO image, 0 format not recognized, <0 error
*/ */
int isoburn_read_iso_head(struct burn_drive *d, int lba, int isoburn_read_iso_head(struct burn_drive *d, int lba,
int *image_blocks, char *info, int flag); int *image_blocks, char *info, int flag);
@ -1050,6 +1054,9 @@ off_t isoburn_disc_available_space(struct burn_drive *d,
case of random access media this will always be 0. Succesfull return is case of random access media this will always be 0. Succesfull return is
not a guarantee that there is a ISO-9660 image at all. The call will fail, not a guarantee that there is a ISO-9660 image at all. The call will fail,
nevertheless,if isoburn_disc_get_status() returns not BURN_DISC_APPENDABLE. nevertheless,if isoburn_disc_get_status() returns not BURN_DISC_APPENDABLE.
Note: The result of this call may be fabricated by a previous call of
isoburn_set_msc1() which can override the rule to load the most recent
session.
Wrapper for: burn_disc_get_msc1() Wrapper for: burn_disc_get_msc1()
@since 0.1.0 @since 0.1.0
@param d The drive to inquire @param d The drive to inquire

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.07.16.140043" #define Xorriso_timestamP "2008.07.17.110812"