Reporting BD spare area info with -list_formats
This commit is contained in:
parent
4fd78f9049
commit
be11642977
@ -1157,7 +1157,7 @@ int Xorriso_tell_media_space(struct XorrisO *xorriso,
|
|||||||
*/
|
*/
|
||||||
int Xorriso_list_formats(struct XorrisO *xorriso, int flag)
|
int Xorriso_list_formats(struct XorrisO *xorriso, int flag)
|
||||||
{
|
{
|
||||||
int ret, i, status, num_formats, profile_no, type;
|
int ret, i, status, num_formats, profile_no, type, alloc_blocks, free_blocks;
|
||||||
off_t size;
|
off_t size;
|
||||||
unsigned dummy;
|
unsigned dummy;
|
||||||
char status_text[80], profile_name[90], *respt;
|
char status_text[80], profile_name[90], *respt;
|
||||||
@ -1206,6 +1206,12 @@ int Xorriso_list_formats(struct XorrisO *xorriso, int flag)
|
|||||||
sprintf(status_text, "illegal status according to MMC-5");
|
sprintf(status_text, "illegal status according to MMC-5");
|
||||||
sprintf(respt, "Format status: %s\n", status_text);
|
sprintf(respt, "Format status: %s\n", status_text);
|
||||||
Xorriso_result(xorriso,0);
|
Xorriso_result(xorriso,0);
|
||||||
|
ret= burn_disc_get_bd_spare_info(drive, &alloc_blocks, &free_blocks, 0);
|
||||||
|
if(ret == 1) {
|
||||||
|
sprintf(respt, "BD Spare Area: %d blocks consumed, %d blocks available\n",
|
||||||
|
alloc_blocks - free_blocks, free_blocks);
|
||||||
|
Xorriso_result(xorriso,0);
|
||||||
|
}
|
||||||
|
|
||||||
for (i= 0; i < num_formats; i++) {
|
for (i= 0; i < num_formats; i++) {
|
||||||
ret= burn_disc_get_format_descr(drive, i, &type, &size, &dummy);
|
ret= burn_disc_get_format_descr(drive, i, &type, &size, &dummy);
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2010.09.24.110727"
|
#define Xorriso_timestamP "2010.09.24.110841"
|
||||||
|
Loading…
Reference in New Issue
Block a user