Displaying free space rather than "non-data" on drive aquiry and -toc

This commit is contained in:
2008-04-20 11:15:07 +00:00
parent bf35527e06
commit a28dcd45ef
3 changed files with 23 additions and 5 deletions

View File

@ -433,13 +433,21 @@ off_t isoburn_disc_available_space(struct burn_drive *d,
{
int ret;
struct isoburn *o;
struct burn_write_opts *eff_opts= NULL, *local_opts= NULL;
off_t avail;
eff_opts= opts;
ret= isoburn_find_emulator(&o, d, 0);
if(ret>0 && o!=NULL)
if(o->emulation_mode!=0)
burn_write_opts_set_start_byte(opts, ((off_t) o->nwa) * (off_t) 2048);
avail= burn_disc_available_space(d, opts);
if(o->emulation_mode!=0) {
local_opts= burn_write_opts_new(d);
eff_opts= local_opts;
burn_write_opts_set_start_byte(eff_opts, ((off_t) o->nwa) * (off_t) 2048);
}
avail= burn_disc_available_space(d, eff_opts);
if(local_opts!=NULL)
burn_write_opts_free(local_opts);
local_opts= NULL;
return(avail);
}