[Debburn-devel] [PATCH] Priority reading extenstion

Nikola Pajkovsky npajkovs at redhat.com
Fri Aug 7 13:31:36 UTC 2009


First it will read Rock ridge extension than joliet and last ucs level 1

--- cdrkit-1.1.9/genisoimage/diag/isoinfo.c    2009-08-07 
10:13:39.704116556 +0200
+++ cdrkit-1.1.9-master/genisoimage/diag/isoinfo.c    2009-08-07 
10:11:53.996993656 +0200
@@ -136,6 +136,7 @@

  #define    infile    in_image
  FILE    *infile = NULL;
+int probe_joliet = 1;
  int    use_rock = 0;
  int    use_joliet = 0;
  int    do_listing = 0;
@@ -868,6 +869,9 @@ main(int argc, char *argv[])
          usage(EX_BAD);
      }

+    if( use_joliet || use_rock )
+        probe_joliet = 0;
+
      init_unls();        /* Initialize UNICODE tables */
      init_unls_file(charset);
      if (charset == NULL) {
@@ -1096,7 +1100,7 @@ main(int argc, char *argv[])
          exit(1);
      }

-    if (use_joliet || do_pvd) {
+    if (use_joliet || do_pvd || probe_joliet) {
          int block = 16;
          movebytes(&ipd, &jpd, sizeof (ipd));
          while ((unsigned char) jpd.type[0] != ISO_VD_END) {
@@ -1129,7 +1133,12 @@ main(int argc, char *argv[])
  #endif
          }

-        if (use_joliet && ((unsigned char) jpd.type[0] == ISO_VD_END)) {
+        if(use_joliet == 0 ) {
+            if( probe_joliet && ((unsigned char) jpd.type[0] == 
ISO_VD_END) ) {
+                probe_joliet = 0;
+            }
+        }
+        else if (use_joliet && ((unsigned char) jpd.type[0] == 
ISO_VD_END)) {
  #ifdef    USE_LIBSCHILY
              comerrno(EX_BAD, "Unable to find Joliet SVD\n");
  #else
@@ -1210,8 +1219,47 @@ main(int argc, char *argv[])
          exit(0);
      }

-    if (use_joliet)
-        idr = (struct iso_directory_record *)jpd.root_directory_record;
+
+
+        if ( !(ucs_level > 0) ) {
+            use_joliet = probe_joliet = 0;
+        }
+
+        extent = isonum_733((unsigned char *)idr->extent);
+
+#ifdef    USE_SCG
+        readsecs(extent - sector_offset, buffer, ISO_BLOCKS(sizeof 
(buffer)));
+#else
+        lseek(fileno(infile),
+            ((off_t)(extent - sector_offset)) <<11, SEEK_SET);
+        read(fileno(infile), buffer, sizeof (buffer));
+#endif
+        idr = (struct iso_directory_record *) buffer;
+        if ((c = dump_rr(idr)) != 0) {
+/*            printf("RR %X %d\n", c, c);*/
+            if (c & 1024) {
+                use_rock = 1;
+            } else {
+                use_rock = 0;
+            }
+            /*
+             * This is currently a no op!
+             * We need to check the first plain file instead of
+             * the '.' entry in the root directory.
+             */
+            if (c & 2048) {
+                printf("Apple signatures version %d found\n",
+                                aa_version);
+            }
+        } else {
+            use_rock = 0;
+        }
+
+
+    if( use_rock == 0 ) {
+        if (use_joliet || probe_joliet)
+            idr = (struct iso_directory_record *)jpd.root_directory_record;
+    }

      if (do_pathtab) {
          if (use_joliet) {



More information about the Debburn-devel mailing list