Displaying free space rather than "non-data" on drive aquiry and -toc
This commit is contained in:
@ -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;
|
||||
enum burn_disc_status s;
|
||||
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,
|
||||
"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_nondata= lba - num_data;
|
||||
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",
|
||||
num_sessions, (num_sessions==1 ? "" : "s"), num_data, mem_text);
|
||||
if(num_nondata>0) {
|
||||
Sfile_scale(((double) num_nondata) * 2048.0, mem_text,5,1e4,1);
|
||||
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");
|
||||
Xorriso_result(xorriso,0);
|
||||
|
||||
|
Reference in New Issue
Block a user