diff --git a/xorriso/drive_mgt.c b/xorriso/drive_mgt.c index 29106c31..80dc961a 100644 --- a/xorriso/drive_mgt.c +++ b/xorriso/drive_mgt.c @@ -991,9 +991,8 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag) 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; -*/ + char *sno = NULL; + int sno_len, i; ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive, "on attempt to print Table Of Content", @@ -1021,6 +1020,17 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag) Xorriso_toc_line(xorriso, flag & 8); if(flag & 32) {ret= 1; goto ex;} + + if(!(flag & 1)) { + burn_drive_get_serial_no(drive, &sno, &sno_len); + if(sno_len > 0) { + sprintf(respt, "Drive id : '%s'\n", sno); + Xorriso_toc_line(xorriso, flag & 8); + } + if(sno != NULL) + free(sno); + sno= NULL; + } ret= burn_disc_get_profile(drive, &profile_no, profile_name); s= isoburn_disc_get_status(drive); @@ -1089,6 +1099,24 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag) if((s == BURN_DISC_FULL || s == BURN_DISC_APPENDABLE || s == BURN_DISC_BLANK) && !(flag & 1)) { + burn_drive_get_media_sno(drive, &sno, &sno_len); + if(sno_len > 0) { + sprintf(respt, "Media id : "); + respt+= strlen(respt); + for(i= 0; i < sno_len && i < 1024; i++) { + sprintf(respt, "%2.2X", (unsigned int) ((unsigned char *) sno)[i]); + respt+= 2; + } + if(i < sno_len) + strcat(respt, "..."); + strcat(respt, "\n"); + Xorriso_toc_line(xorriso, flag & 8); + } + if(sno != NULL) + free(sno); + sno= NULL; + respt= xorriso->result_line; + ret= burn_get_read_capacity(drive, &num_data, 0); if(ret != 1 || s == BURN_DISC_BLANK) num_data= 0; diff --git a/xorriso/text_io.c b/xorriso/text_io.c index c9f2e7e9..c2754ae0 100644 --- a/xorriso/text_io.c +++ b/xorriso/text_io.c @@ -2026,6 +2026,8 @@ int Xorriso_sieve_big(struct XorrisO *xorriso, int flag) 1, 0}, {"Drive current:", 3, "Drive current:", "", 2, { 0, 1, -1, -1, -1, -1}, 2, 0}, + {"Drive id :", 3, "Drive id :", "", 1, { 0, -1, -1, -1, -1, -1}, + 2, 0}, {"Drive type :", 3, "Drive type :", "", 3, { 1, 3, 5, -1, -1, -1}, 2, 0}, {"Eff. Time :", 3, "Eff. Time : ", "", 1, { 0, -1, -1, -1, -1, -1}, @@ -2060,6 +2062,8 @@ int Xorriso_sieve_big(struct XorrisO *xorriso, int flag) 2, 0}, {"Media current:", 3, "Media current: ", "", 1, { 0, -1, -1, -1, -1, -1}, 2, 1}, + {"Media id :", 3, "Media id :", "", 1, { 0, -1, -1, -1, -1, -1}, + 2, 0}, {"Media nwa :", 3, "Media nwa :", "", 1, { 0, -1, -1, -1, -1, -1}, 1, 0}, {"Media product:", 3, "Media product:", "", 2, { 0, 2, -1, -1, -1, -1}, diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index e42a90fe..c49d6601 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2015.10.16.155137" +#define Xorriso_timestamP "2015.10.18.130151"