Improved plausibility of xorriso media summary in case of unreliable readbility
This commit is contained in:
parent
01c379c71c
commit
4cd1627acb
@ -897,6 +897,7 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
struct burn_toc_entry next_toc_entry;
|
struct burn_toc_entry next_toc_entry;
|
||||||
int disk_category, part_version, num_layers, num_blocks;
|
int disk_category, part_version, num_layers, num_blocks;
|
||||||
char *book_name;
|
char *book_name;
|
||||||
|
int num_data_from_format= 0;
|
||||||
/*
|
/*
|
||||||
int num_payload= 0, num_wasted= 0, num_nondata= 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);
|
ret= burn_get_read_capacity(drive, &num_data, 0);
|
||||||
if(ret == 1)
|
if(ret == 1)
|
||||||
size= ((off_t) num_data) * (off_t) 2048;
|
size= ((off_t) num_data) * (off_t) 2048;
|
||||||
|
} else {
|
||||||
|
num_data_from_format= 1;
|
||||||
}
|
}
|
||||||
nwa= lba + size / 2048;
|
nwa= lba + size / 2048;
|
||||||
num_data= nwa - lba;
|
num_data= nwa - lba;
|
||||||
@ -1223,7 +1226,10 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
Sfile_scale(((double) num_data) * 2048.0, mem_text,5,1e4,1);
|
Sfile_scale(((double) num_data) * 2048.0, mem_text,5,1e4,1);
|
||||||
sprintf(respt, "Media summary: %d session%s, %d data blocks, %s data",
|
sprintf(respt, "Media summary: %d session%s, %d data blocks, %s data",
|
||||||
num_sessions, (num_sessions==1 ? "" : "s"), num_data, mem_text);
|
num_sessions, (num_sessions==1 ? "" : "s"), num_data, mem_text);
|
||||||
num_free= isoburn_disc_available_space(drive, NULL);
|
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);
|
Sfile_scale((double) num_free, mem_text,5,1e4,1);
|
||||||
sprintf(respt+strlen(respt), ", %s free", mem_text);
|
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