Improved plausibility of xorriso media summary in case of unreliable readbility
This commit is contained in:
parent
d79d96d3b1
commit
d4f50fac6a
@ -897,6 +897,7 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
||||
struct burn_toc_entry next_toc_entry;
|
||||
int disk_category, part_version, num_layers, num_blocks;
|
||||
char *book_name;
|
||||
int num_data_from_format= 0;
|
||||
/*
|
||||
int num_payload= 0, num_wasted= 0, num_nondata= 0;
|
||||
*/
|
||||
@ -1110,6 +1111,8 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
||||
ret= burn_get_read_capacity(drive, &num_data, 0);
|
||||
if(ret == 1)
|
||||
size= ((off_t) num_data) * (off_t) 2048;
|
||||
} else {
|
||||
num_data_from_format= 1;
|
||||
}
|
||||
nwa= lba + size / 2048;
|
||||
num_data= nwa - lba;
|
||||
@ -1223,6 +1226,9 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
||||
Sfile_scale(((double) num_data) * 2048.0, mem_text,5,1e4,1);
|
||||
sprintf(respt, "Media summary: %d session%s, %d data blocks, %s data",
|
||||
num_sessions, (num_sessions==1 ? "" : "s"), num_data, mem_text);
|
||||
if(num_data_from_format)
|
||||
num_free= 0;
|
||||
else
|
||||
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);
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2011.10.09.162439"
|
||||
#define Xorriso_timestamP "2011.10.13.105921"
|
||||
|
Loading…
Reference in New Issue
Block a user