Made -print_size take into account the toc emulation on blank overwriteables

This commit is contained in:
Thomas Schmitt 2010-12-28 09:32:06 +00:00
parent 80c17eafd7
commit 3f3aa05f64
2 changed files with 13 additions and 3 deletions

View File

@ -98,10 +98,11 @@ int Xorriso_sanitize_image_size(struct XorrisO *xorriso,
struct burn_write_opts *burn_options, int flag)
{
int ret, img_sectors, num_sessions= 0, num_tracks= 0, padding= 0, profile;
int media_space, lba, nwa;
int media_space, lba, nwa, multi_emul_blocks= 0;
char profile_name[80];
struct burn_session **sessions;
struct burn_track **tracks;
enum burn_disc_status s;
img_sectors= burn_disc_get_sectors(disc);
@ -140,6 +141,15 @@ no_track:;
sessions survive and confuse -rom_toc_scan.
*/
xorriso->alignment= 32;
s= isoburn_disc_get_status(drive);
if(s == BURN_DISC_BLANK) {
/* Count blocks before nwa as part of the image */;
ret= isoburn_disc_track_lba_nwa(drive, burn_options, 0, &lba, &nwa);
if(ret <= 0)
nwa= 0;
multi_emul_blocks= nwa;
}
}
}
if(xorriso->alignment > 0) {
@ -176,7 +186,7 @@ no_track:;
{ret= 0; goto ex;}
}
if(flag&1) {
ret= img_sectors+padding;
ret= multi_emul_blocks + img_sectors + padding;
} else
ret= 1;
ex:;

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.12.25.094309"
#define Xorriso_timestamP "2010.12.28.093144"