New flag options with isoburn_read_iso_head()

This commit is contained in:
Thomas Schmitt 2008-07-14 12:04:51 +00:00
parent cf9bc140b1
commit 8b5af86a64
3 changed files with 13 additions and 6 deletions

View File

@ -989,6 +989,7 @@ int isoburn_read_iso_head_parse(struct burn_drive *d, unsigned char *data,
0= do not return anything in info (do not even touch it) 0= do not return anything in info (do not even touch it)
1= copy volume id to info (info needs 33 bytes) 1= copy volume id to info (info needs 33 bytes)
2= copy 64 kB header to info (needs 65536 bytes) 2= copy 64 kB header to info (needs 65536 bytes)
bit13= do not read head from media but use first 64 kB from info
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
@ -1004,13 +1005,17 @@ int isoburn_read_iso_head(struct burn_drive *d, int lba,
info_mode= flag&255; info_mode= flag&255;
*image_blocks= 0; *image_blocks= 0;
if(flag&(1<<13)) {
memcpy(buffer, info, 64*1024);
} else {
ret = burn_read_data(d, ((off_t) lba) * (off_t) 2048, (char *) buffer, ret = burn_read_data(d, ((off_t) lba) * (off_t) 2048, (char *) buffer,
(off_t) 64*1024, &data_count, 2); /* no error messages */ (off_t) 64*1024, &data_count, 2); /* no error messages */
if(ret<=0) if(ret<=0)
return(-1*!!(flag&(1<<15))); return(-1*!!(flag&(1<<15)));
if(info_mode==2) if(info_mode==2)
memcpy(info, buffer, 64*1024); memcpy(info, buffer, 64*1024);
}
if(flag&(1<<14)) { if(flag&(1<<14)) {
ret= isoburn_read_iso_head_parse(d, buffer, image_blocks, info, info_mode); ret= isoburn_read_iso_head_parse(d, buffer, image_blocks, info, info_mode);
if(ret<0) if(ret<0)

View File

@ -583,6 +583,8 @@ void isoburn_toc_disc_free(struct isoburn_toc_disc *disc);
1= copy volume id to info (info needs 33 bytes) 1= copy volume id to info (info needs 33 bytes)
2= @since 0.2.2 : 2= @since 0.2.2 :
copy 64 kB header to info (needs 65536 bytes) copy 64 kB header to info (needs 65536 bytes)
bit13= @since 0.2.2:
do not read head from media but use first 64 kB from info
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

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.07.14.114613" #define Xorriso_timestamP "2008.07.14.120527"