Displaying eventual BD spare area information with --list_formats

This commit is contained in:
Thomas Schmitt 2010-09-24 09:19:44 +00:00
parent 07ce895592
commit c8920b709b
2 changed files with 9 additions and 3 deletions

View File

@ -5225,7 +5225,6 @@ int Cdrskin_minfo(struct CdrskiN *skin, int flag)
printf("number of sessions: %d\n", nominal_sessions); printf("number of sessions: %d\n", nominal_sessions);
printf("first track in last sess: %d\n", ftils); printf("first track in last sess: %d\n", ftils);
printf("last track in last sess: %d\n", ltils); printf("last track in last sess: %d\n", ltils);
ret= burn_disc_get_bd_spare_info(drive, &alloc_blocks, &free_blocks, 0);
burn_disc_get_cd_info(drive, disc_type, &disc_id, bar_code, &app_code, burn_disc_get_cd_info(drive, disc_type, &disc_id, bar_code, &app_code,
&cd_info_valid); &cd_info_valid);
@ -5240,6 +5239,7 @@ int Cdrskin_minfo(struct CdrskiN *skin, int flag)
printf("Disk type: unrecognizable\n"); printf("Disk type: unrecognizable\n");
if(cd_info_valid & 2) if(cd_info_valid & 2)
printf("Disk id: 0x%-X\n", disc_id); printf("Disk id: 0x%-X\n", disc_id);
ret= burn_disc_get_bd_spare_info(drive, &alloc_blocks, &free_blocks, 0);
if(ret == 1) { if(ret == 1) {
printf("BD Spare Area consumed: %d\n", alloc_blocks - free_blocks); printf("BD Spare Area consumed: %d\n", alloc_blocks - free_blocks);
printf("BD Spare Area available: %d\n", free_blocks); printf("BD Spare Area available: %d\n", free_blocks);
@ -5644,7 +5644,7 @@ ex:;
int Cdrskin_list_formats(struct CdrskiN *skin, int flag) int Cdrskin_list_formats(struct CdrskiN *skin, int flag)
{ {
struct burn_drive *drive; struct burn_drive *drive;
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]; char status_text[80], profile_name[90];
@ -5692,6 +5692,12 @@ int Cdrskin_list_formats(struct CdrskiN *skin, int flag)
sprintf(status_text, "illegal status according to MMC-5"); sprintf(status_text, "illegal status according to MMC-5");
printf("Format status: %s\n", status_text); printf("Format status: %s\n", status_text);
ret= burn_disc_get_bd_spare_info(drive, &alloc_blocks, &free_blocks, 0);
if(ret == 1) {
printf("BD Spare Area consumed: %d\n", alloc_blocks - free_blocks);
printf("BD Spare Area available: %d\n", free_blocks);
}
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);
if (ret <= 0) if (ret <= 0)

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2010.09.24.090731" #define Cdrskin_timestamP "2010.09.24.091902"