From 1420ed74dab62301bb06528e8a6de83c795df1d5 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 17 Oct 2007 20:02:45 +0000 Subject: [PATCH] Continued work with -toc --- test/xorriso_timestamp.h | 2 +- test/xorrisoburn.c | 25 +++++++++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/test/xorriso_timestamp.h b/test/xorriso_timestamp.h index 72a8ef2f..a899b2df 100644 --- a/test/xorriso_timestamp.h +++ b/test/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2007.10.17.183024" +#define Xorriso_timestamP "2007.10.17.200241" diff --git a/test/xorrisoburn.c b/test/xorrisoburn.c index 806a2812..154f94ab 100644 --- a/test/xorrisoburn.c +++ b/test/xorrisoburn.c @@ -156,7 +156,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag) if(isoburn_read_volset(drive, &ropts, &volset) <= 0) { Xorriso_process_msg_queues(xorriso,0); - sprintf(xorriso->info_text,"Caninot read ISO image volset"); + sprintf(xorriso->info_text,"Cannot read ISO image volset"); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); ret= 0; goto ex; } @@ -502,7 +502,7 @@ int Xorriso_process_msg_queues(struct XorrisO *xorriso, int flag) int Xorriso_toc(struct XorrisO *xorriso, int flag) { - int num_sessions= 0 , num_tracks= 0 , lba= 0, nwa, pmin, psec, pframe, ret; + int num_sessions= 0, num_tracks= 0, lba= 0, nwa= 0, pmin, psec, pframe, ret; int track_count= 0, session_no, track_no, profile_no= -1; int last_track_start= 0, last_track_size= -1; char profile_name[80],*respt; @@ -526,6 +526,12 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag) respt= xorriso->result_line; + sprintf(respt, "Drive current: -indev '%s'\n", xorriso->indev); + Xorriso_result(xorriso,0); + sprintf(respt, "Drive type : vendor '%s' product '%s' revision '%s'\n", + dinfo[0].vendor, dinfo[0].product, dinfo[0].revision); + Xorriso_result(xorriso,0); + sprintf(respt, "Media current: "); ret= burn_disc_get_profile(drive, &profile_no, profile_name); if (profile_no > 0 && ret > 0) { @@ -602,17 +608,20 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag) lba= burn_msf_to_lba(toc_entry.pmin, toc_entry.psec, toc_entry.pframe); } sprintf(respt, "Media content: session %2d ", session_no+1); - Xorriso_result(xorriso,0); - sprintf(respt, "leadout lba: %9d\n", lba); + sprintf(respt+strlen(respt), "leadout lba: %9d\n", lba); Xorriso_result(xorriso,0); last_track_size= lba - last_track_start; + if (s == BURN_DISC_APPENDABLE) { + ret= isoburn_disc_track_lba_nwa(drive, NULL, 0, &lba, &nwa); + if(ret<=0) + nwa= 0; + } } } - if (s == BURN_DISC_APPENDABLE) { - - /* >>> tell nwa */; - + if (s == BURN_DISC_APPENDABLE && nwa>0) { + sprintf(respt, "Media nwa : %ds\n", nwa); + Xorriso_result(xorriso,0); } if (disc!=NULL)