Hi Vincent,

Am Montag, 8. Januar 2007 14:30 schrieb Vincent Lefevre:
> On 2007-01-07 20:30:44 +0100, Carsten Gnörlich wrote:
> > I suspect it is trying to issue a warning dialog or message about some
> > [..]
>
> When I click on "Read", I get a dialog box "Question" saying:
>
>   Faster medium initialization
> [..]

Ah. I suspected right; that dialog wasn't protected against being called from 
the CLI. Stupid me.
I've attached a patch against udf.c to rectify this; the bug and the fix 
should reproduce on any DVD-RW/+RW without RS02 ecc data in command line mode.
I'll publish an updated version 0.70.4 in a few days when I have shed more 
light on bug 405463 as well.

Thanks and greetings,
  Carsten

-- 
Carsten Gnörlich * Project homepage http://www.dvdisaster.de
dvdisaster: Additional error correction for CD and DVD media.
GnuPG FP: 12B3 1535 AF90 3ADE 9E73 BA7E 5A59 0EFE F5F6 C46C 






--- udf.c       2007-01-09 22:23:14.858057472 +0100
+++ ../dvdisaster-0.70.4/udf.c  2007-01-09 22:15:46.236258352 +0100
@@ -181,25 +181,28 @@
    gint64 header_modulo;
    int read_count = 0;
    int answered_continue = FALSE;
+   int warning_shown = FALSE;
 
    /*** Quick search at fixed offsets relative to ISO filesystem */
 
-   if(!max_sectors && dh->isoInfo)
-   {  gint64 iso_size = dh->isoInfo->volumeSize; 
-
-      /* Iso size is correct; look for root sector at +2 */
-
-      if(try_sector(dh, iso_size, &eh) == HEADER_FOUND)
-      {  Verbose("Root sector search at +0 successful\n");
-        return eh;
-      }
+   if(!max_sectors)
+   {  if(dh->isoInfo)
+      {  gint64 iso_size = dh->isoInfo->volumeSize; 
+
+        /* Iso size is correct; look for root sector at +2 */
+
+         if(try_sector(dh, iso_size, &eh) == HEADER_FOUND)
+        {  Verbose("Root sector search at +0 successful\n");
+           return eh;
+        }
 
-      /* Strange stuff. Sometimes the iso size is increased by 150
-        sectors by the burning software. */
+        /* Strange stuff. Sometimes the iso size is increased by 150
+           sectors by the burning software. */
 
-      if(try_sector(dh, iso_size-150, &eh) == HEADER_FOUND)
-      {  Verbose("Root sector search at -150 successful\n");
-        return eh;
+        if(try_sector(dh, iso_size-150, &eh) == HEADER_FOUND)
+        {  Verbose("Root sector search at -150 successful\n");
+          return eh;
+        }
       }
 
       return NULL;
@@ -244,14 +247,23 @@
               SetBit(try_next_header, pos);
               read_count++;
               if(!answered_continue && read_count > 5)
-              {  int answer = ModalDialog(GTK_MESSAGE_QUESTION, 
GTK_BUTTONS_NONE, insert_buttons,
-                                          _("Faster medium initialization\n\n"
-                                            "Searching rewriteable media for 
error correction data may take a long time.\n"
-                                            "Press \"Skip RS02 test\" if you 
are certain that this medium was\n"
-                                            "not augmented with RS02 error 
correction data."));
-                
-                 if(answer) goto bail_out;
-                 answered_continue = TRUE;
+              {  if(Closure->guiMode)
+                 {  int answer = ModalDialog(GTK_MESSAGE_QUESTION, 
GTK_BUTTONS_NONE, insert_buttons,
+                                             _("Faster medium 
initialization\n\n"
+                                               "Searching rewriteable media 
for error correction data may take a long time.\n"
+                                               "Press \"Skip RS02 test\" if 
you are certain that this medium was\n"
+                                               "not augmented with RS02 error 
correction data."));
+                   
+                   if(answer) goto bail_out;
+                   answered_continue = TRUE;
+                 }
+                 if(!Closure->guiMode && !warning_shown)
+                 {  PrintCLI(_("\nSearching rewriteable media for error 
correction data may take a long time.\n"
+                               "If you are certain that this medium was not 
augmented with RS02 error correction\n"
+                               "data, you might wish to abort this command and 
re-run with the option\n"
+                               "--query-size=udf\n"));
+                   warning_shown = TRUE;
+                 }
               }
               goto check_next_header;
            case TRY_NEXT_MODULO:

Reply via email to