Displaying free space rather than "non-data" on drive aquiry and -toc
This commit is contained in:
parent
e1c46f5023
commit
b937313bb5
@ -433,13 +433,21 @@ off_t isoburn_disc_available_space(struct burn_drive *d,
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct isoburn *o;
|
struct isoburn *o;
|
||||||
|
struct burn_write_opts *eff_opts= NULL, *local_opts= NULL;
|
||||||
off_t avail;
|
off_t avail;
|
||||||
|
|
||||||
|
eff_opts= opts;
|
||||||
ret= isoburn_find_emulator(&o, d, 0);
|
ret= isoburn_find_emulator(&o, d, 0);
|
||||||
if(ret>0 && o!=NULL)
|
if(ret>0 && o!=NULL)
|
||||||
if(o->emulation_mode!=0)
|
if(o->emulation_mode!=0) {
|
||||||
burn_write_opts_set_start_byte(opts, ((off_t) o->nwa) * (off_t) 2048);
|
local_opts= burn_write_opts_new(d);
|
||||||
avail= burn_disc_available_space(d, opts);
|
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);
|
return(avail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2008.04.20.111054"
|
#define Xorriso_timestamP "2008.04.20.111419"
|
||||||
|
@ -2214,7 +2214,7 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
struct burn_drive *drive;
|
struct burn_drive *drive;
|
||||||
enum burn_disc_status s;
|
enum burn_disc_status s;
|
||||||
char mem_text[80];
|
char mem_text[80];
|
||||||
off_t start_byte= 0;
|
off_t start_byte= 0, num_free= 0;
|
||||||
|
|
||||||
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
|
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
|
||||||
"on attempt to print Table Of Content", flag&2);
|
"on attempt to print Table Of Content", flag&2);
|
||||||
@ -2352,12 +2352,22 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
num_wasted= lba - num_payload;
|
num_wasted= lba - num_payload;
|
||||||
num_nondata= lba - num_data;
|
num_nondata= lba - num_data;
|
||||||
Sfile_scale(((double) num_data) * 2048.0, mem_text,5,1e4,1);
|
Sfile_scale(((double) num_data) * 2048.0, mem_text,5,1e4,1);
|
||||||
|
|
||||||
|
#ifdef NIX
|
||||||
sprintf(respt, "Media summary: %d session%s, %d data blocks, %s",
|
sprintf(respt, "Media summary: %d session%s, %d data blocks, %s",
|
||||||
num_sessions, (num_sessions==1 ? "" : "s"), num_data, mem_text);
|
num_sessions, (num_sessions==1 ? "" : "s"), num_data, mem_text);
|
||||||
if(num_nondata>0) {
|
if(num_nondata>0) {
|
||||||
Sfile_scale(((double) num_nondata) * 2048.0, mem_text,5,1e4,1);
|
Sfile_scale(((double) num_nondata) * 2048.0, mem_text,5,1e4,1);
|
||||||
sprintf(respt+strlen(respt), ", %s non-data", mem_text);
|
sprintf(respt+strlen(respt), ", %s non-data", mem_text);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
sprintf(respt, "Media summary: %d session%s, %d data blocks, %s data",
|
||||||
|
num_sessions, (num_sessions==1 ? "" : "s"), num_data, mem_text);
|
||||||
|
num_free= isoburn_disc_available_space(drive, NULL);
|
||||||
|
Sfile_scale((double) num_free, mem_text,5,1e4,1);
|
||||||
|
sprintf(respt+strlen(respt), ", %s free", mem_text);
|
||||||
|
#endif
|
||||||
|
|
||||||
sprintf(respt+strlen(respt), "\n");
|
sprintf(respt+strlen(respt), "\n");
|
||||||
Xorriso_result(xorriso,0);
|
Xorriso_result(xorriso,0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user