From 9fc6ea95140a65e6fae349d7bbeaa8431efe49d5 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 18 Oct 2015 13:31:38 +0000 Subject: [PATCH] New -toc output lines "Drive id" and "Media id" --- libburn/trunk/cdrskin/cdrskin.c | 24 +++++++++++++++++++++++ libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/libburn/trunk/cdrskin/cdrskin.c b/libburn/trunk/cdrskin/cdrskin.c index 6d98b0d8..392e4c76 100644 --- a/libburn/trunk/cdrskin/cdrskin.c +++ b/libburn/trunk/cdrskin/cdrskin.c @@ -4806,6 +4806,8 @@ int Cdrskin_checkdrive(struct CdrskiN *skin, char *profile_name, int flag) struct burn_drive_info *drive_info; int ret; char btldev[Cdrskin_adrleN]; + char *sno= NULL; + int sno_len = 0; if(!(flag&1)) { if(flag&2) @@ -4844,6 +4846,12 @@ int Cdrskin_checkdrive(struct CdrskiN *skin, char *profile_name, int flag) if(flag&2) {ret= 1; goto ex;} + burn_drive_get_serial_no(drive_info->drive, &sno, &sno_len); + if(sno_len > 0) + printf("Drive id : '%s'\n", sno); + if(sno != NULL) + free(sno); + sno= NULL; printf("Driver flags : %s\n","BURNFREE"); printf("Supported modes:"); if((drive_info->tao_block_types & (BURN_BLOCK_MODE1)) @@ -5537,6 +5545,8 @@ int Cdrskin_atip(struct CdrskiN *skin, int flag) int profile_number= 0; char profile_name[80], *manuf= NULL, *media_code1= NULL, *media_code2= NULL; char *book_type= NULL, *product_id= NULL; + char *sno= NULL; + int sno_len = 0, i; ClN(printf("cdrskin: pseudo-atip on drive %d\n",skin->driveno)); ret= Cdrskin_grab_drive(skin,0); @@ -5681,6 +5691,20 @@ int Cdrskin_atip(struct CdrskiN *skin, int flag) } } + burn_drive_get_media_sno(drive, &sno, &sno_len); + if(sno_len > 0) { + printf("Media id: "); + for(i= 0; i < sno_len && i < 1024; i++) + printf("%2.2X", (unsigned int) ((unsigned char *) sno)[i]); + if(i < sno_len) + printf("..."); + printf("\n"); + } + if(sno != NULL) + free(sno); + sno= NULL; + + ret= 1; if(flag&1) ret= Cdrskin_toc(skin, !(flag & 2)); diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index 03ba2425..175f7385 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2015.10.18.125353" +#define Cdrskin_timestamP "2015.10.18.133327"