~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/fix-872244

« back to all changes in this revision

Viewing changes to util/mkisofs/joliet.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-01-11 11:12:55 UTC
  • mfrom: (17.3.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100111111255-lr8ebkqw5x41gq6j
Tags: 1.98~20100101-1ubuntu1
* Resynchronise with Debian. Remaining changes:
  - Adjust for default Ubuntu boot options ("quiet splash").
  - Default to hiding the menu; holding down Shift at boot will show it.
  - Set a monochromatic theme for Ubuntu.
  - Apply Ubuntu GRUB Legacy changes to legacy update-grub script: title,
    recovery mode, quiet option, tweak how memtest86+ is displayed, and
    use UUIDs where appropriate.
  - Conflict with grub (<< 0.97-54) as well as grub-legacy.
  - Fix backslash-escaping in merge_debconf_into_conf.
  - Remove "GNU/Linux" from default distributor string.
  - Add crashkernel= options if kdump and makedumpfile are available.
  - If other operating systems are installed, then automatically unhide
    the menu. Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus
    if available to check whether Shift is pressed. If it is, show the
    menu, otherwise boot immediately. If keystatus is not available, then
    fall back to a short delay interruptible with Escape.
  - Allow Shift to interrupt 'sleep --interruptible'.
  - Don't display introductory message about line editing unless we're
    actually offering a shell prompt. Don't clear the screen just before
    booting if we never drew the menu in the first place.
  - Remove some verbose messages printed before reading the configuration
    file.
  - If the environment variable "quiet" is set to something other than 0,
    suppress progress messages as the kernel and initrd load. Set this for
    non-recovery kernel menu entries.
  - Add GRUB_DEFAULT=saved, as well as grub-set-default and grub-reboot
    utilities. Provides functionality essentially equivalent to GRUB
    Legacy's savedefault.
  - Keep the loopback file open so that subsequent changes to the "root"
    environment variable don't affect it.
  - Change prepare_grub_to_access_device to handle filesystems
    loop-mounted on file images.
  - Ignore devices loop-mounted from files in 10_linux.
  - Show the boot menu if the previous boot failed, that is if it failed
    to get to the end of one of the normal runlevels.
  - Handle RAID devices containing virtio components.
* Update savedefault patch from current Bazaar branch, fixing grub-reboot
  to have distinct behaviour from grub-set-default (LP: #497326).
* Fix grub-mkisofs compilation error with FORTIFY_SOURCE.
* Convert recordfail boilerplate in each menu entry to use a function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
static void DECL(assign_joliet_directory_addresses, (struct directory * node));
88
88
static int jroot_gen    __PR((void));
89
89
 
90
 
/* 
 
90
/*
91
91
 * Function:            convert_to_unicode
92
92
 *
93
93
 * Purpose:             Perform a 1/2 assed unicode conversion on a text
94
94
 *                      string.
95
95
 *
96
 
 * Notes:               
 
96
 * Notes:       
97
97
 */
98
98
static void FDECL3(convert_to_unicode, unsigned char *, buffer, int, size, char *, source )
99
99
{
127
127
         * JS integrated from: Achim_Kaiser@t-online.de
128
128
         *
129
129
         * Let all valid unicode characters pass through (assuming ISO-8859-1).
130
 
         * Others are set to '_' . 
131
 
         */ 
132
 
        if( tmpbuf[j] != 0 &&  
 
130
         * Others are set to '_' .
 
131
         */
 
132
        if( tmpbuf[j] != 0 && 
133
133
           (tmpbuf[j] <= 0x1f || (tmpbuf[j] >= 0x7F && tmpbuf[j] <= 0xA0)) )
134
134
        {
135
135
          buffer[i+1]     = '_';
163
163
    }
164
164
}
165
165
 
166
 
/* 
 
166
/*
167
167
 * Function:            joliet_strlen
168
168
 *
169
169
 * Purpose:             Return length in bytes of string after conversion to unicode.
178
178
 
179
179
  rtn = strlen(string) << 1;
180
180
 
181
 
  /* 
 
181
  /*
182
182
   * We do clamp the maximum length of a Joliet string to be the
183
183
   * maximum path size.  This helps to ensure that we don't completely
184
184
   * bolix things up with very long paths.    The Joliet specs say
191
191
  return rtn;
192
192
}
193
193
 
194
 
/* 
 
194
/*
195
195
 * Function:            get_joliet_vol_desc
196
196
 *
197
197
 * Purpose:             generate a Joliet compatible volume desc.
212
212
   * "expands" 8 bit character codes to 16 bits and does nothing
213
213
   * special with the Unicode characters, therefore shouldn't mkisofs
214
214
   * really be stating that it's using UCS-2 Level 1, not Level 3 for
215
 
   * the Joliet directory tree.  
 
215
   * the Joliet directory tree. 
216
216
   */
217
217
  strcpy(jvol_desc->escape_sequences, "%/@");
218
218
 
228
228
  /*
229
229
   * Set this one up.
230
230
   */
231
 
  memcpy(jvol_desc->root_directory_record, &jroot_record, 
 
231
  memcpy(jvol_desc->root_directory_record, &jroot_record,
232
232
         sizeof(struct iso_directory_record));
233
233
 
234
234
  /*
256
256
     struct directory * dpnt;
257
257
 
258
258
     dpnt = node;
259
 
     
 
259
    
260
260
     while (dpnt)
261
261
     {
262
262
         if( (dpnt->dir_flags & INHIBIT_JOLIET_ENTRY) == 0 )
275
275
         }
276
276
 
277
277
         /* skip if hidden - but not for the rr_moved dir */
278
 
         if(dpnt->subdir && (!(dpnt->dir_flags & INHIBIT_JOLIET_ENTRY) || dpnt == reloc_dir)) 
 
278
         if(dpnt->subdir && (!(dpnt->dir_flags & INHIBIT_JOLIET_ENTRY) || dpnt == reloc_dir))
279
279
         {
280
280
             assign_joliet_directory_addresses(dpnt->subdir);
281
281
         }
283
283
     }
284
284
}
285
285
 
286
 
static 
 
286
static
287
287
void FDECL1(build_jpathlist, struct directory *, node)
288
288
{
289
289
     struct directory * dpnt;
290
 
     
 
290
    
291
291
     dpnt = node;
292
 
     
 
292
    
293
293
     while (dpnt)
294
294
 
295
295
     {
302
302
     }
303
303
} /* build_jpathlist(... */
304
304
 
305
 
static int FDECL2(joliet_compare_paths, void const *, r, void const *, l) 
 
305
static int FDECL2(joliet_compare_paths, void const *, r, void const *, l)
306
306
{
307
307
  struct directory const *ll = *(struct directory * const *)l;
308
308
  struct directory const *rr = *(struct directory * const *)r;
325
325
       return -1;
326
326
  }
327
327
 
328
 
  if (rparent > lparent) 
 
328
  if (rparent > lparent)
329
329
  {
330
330
       return 1;
331
331
  }
332
332
 
333
333
  return strcmp(rr->self->name, ll->self->name);
334
 
  
 
334
 
335
335
} /* compare_paths(... */
336
336
 
337
337
static int generate_joliet_path_tables()
346
346
  int                      tablesize;
347
347
 
348
348
  /*
349
 
   * First allocate memory for the tables and initialize the memory 
 
349
   * First allocate memory for the tables and initialize the memory
350
350
   */
351
351
  tablesize = jpath_blocks << 11;
352
352
  jpath_table_m = (char *) e_malloc(tablesize);
361
361
      exit (1);
362
362
  }
363
363
  /*
364
 
   * Now start filling in the path tables.  Start with root directory 
 
364
   * Now start filling in the path tables.  Start with root directory
365
365
   */
366
366
  jpath_table_index = 0;
367
 
  jpathlist = (struct directory **) e_malloc(sizeof(struct directory *) 
 
367
  jpathlist = (struct directory **) e_malloc(sizeof(struct directory *)
368
368
                                            * next_jpath_index);
369
369
  memset(jpathlist, 0, sizeof(struct directory *) * next_jpath_index);
370
370
  build_jpathlist(root);
373
373
  {
374
374
       fix = 0;
375
375
#ifdef  __STDC__
376
 
       qsort(&jpathlist[1], next_jpath_index-1, sizeof(struct directory *), 
 
376
       qsort(&jpathlist[1], next_jpath_index-1, sizeof(struct directory *),
377
377
             (int (*)(const void *, const void *))joliet_compare_paths);
378
378
#else
379
 
       qsort(&jpathlist[1], next_jpath_index-1, sizeof(struct directory *), 
 
379
       qsort(&jpathlist[1], next_jpath_index-1, sizeof(struct directory *),
380
380
             joliet_compare_paths);
381
381
#endif
382
382
 
399
399
            exit (1);
400
400
       }
401
401
       npnt = dpnt->de_name;
402
 
       
 
402
      
403
403
       npnt1 = strrchr(npnt, PATH_SEPARATOR);
404
 
       if(npnt1) 
405
 
       { 
 
404
       if(npnt1)
 
405
       {
406
406
            npnt = npnt1 + 1;
407
407
       }
408
 
       
 
408
      
409
409
       de = dpnt->self;
410
 
       if(!de) 
 
410
       if(!de)
411
411
       {
412
 
            fprintf (stderr, _("Fatal goof - directory has amnesia\n")); 
 
412
            fprintf (stderr, _("Fatal goof - directory has amnesia\n"));
413
413
            exit (1);
414
414
       }
415
 
       
 
415
      
416
416
       namelen = joliet_strlen(de->name);
417
417
 
418
418
       if( dpnt == root )
426
426
           jpath_table_m[jpath_table_index] = namelen;
427
427
         }
428
428
       jpath_table_index += 2;
429
 
       
430
 
       set_731(jpath_table_l + jpath_table_index, dpnt->jextent); 
431
 
       set_732(jpath_table_m + jpath_table_index, dpnt->jextent); 
 
429
      
 
430
       set_731(jpath_table_l + jpath_table_index, dpnt->jextent);
 
431
       set_732(jpath_table_m + jpath_table_index, dpnt->jextent);
432
432
       jpath_table_index += 4;
433
 
       
 
433
      
434
434
       if( dpnt->parent != reloc_dir )
435
435
         {
436
 
           set_721(jpath_table_l + jpath_table_index, 
437
 
                   dpnt->parent->jpath_index); 
438
 
           set_722(jpath_table_m + jpath_table_index, 
439
 
                   dpnt->parent->jpath_index); 
 
436
           set_721(jpath_table_l + jpath_table_index,
 
437
                   dpnt->parent->jpath_index);
 
438
           set_722(jpath_table_m + jpath_table_index,
 
439
                   dpnt->parent->jpath_index);
440
440
         }
441
441
       else
442
442
         {
443
 
           set_721(jpath_table_l + jpath_table_index, 
444
 
                   dpnt->self->parent_rec->filedir->jpath_index); 
445
 
           set_722(jpath_table_m + jpath_table_index, 
446
 
                   dpnt->self->parent_rec->filedir->jpath_index); 
 
443
           set_721(jpath_table_l + jpath_table_index,
 
444
                   dpnt->self->parent_rec->filedir->jpath_index);
 
445
           set_722(jpath_table_m + jpath_table_index,
 
446
                   dpnt->self->parent_rec->filedir->jpath_index);
447
447
         }
448
448
 
449
449
       jpath_table_index += 2;
450
 
       
 
450
      
451
451
       /*
452
452
        * The root directory is still represented in non-unicode fashion.
453
453
        */
459
459
         }
460
460
       else
461
461
         {
462
 
           convert_to_unicode((uint8_t *)jpath_table_l + jpath_table_index,  
 
462
           convert_to_unicode((uint8_t *)jpath_table_l + jpath_table_index, 
463
463
                              namelen, de->name);
464
 
           convert_to_unicode((uint8_t *)jpath_table_m + jpath_table_index, 
 
464
           convert_to_unicode((uint8_t *)jpath_table_m + jpath_table_index,
465
465
                              namelen, de->name);
466
466
           jpath_table_index += namelen;
467
467
         }
468
468
 
469
 
       if(jpath_table_index & 1) 
 
469
       if(jpath_table_index & 1)
470
470
       {
471
471
            jpath_table_index++;  /* For odd lengths we pad */
472
472
       }
473
473
  }
474
 
  
 
474
 
475
475
  free(jpathlist);
476
476
  if(jpath_table_index != jpath_table_size)
477
477
  {
493
493
     unsigned int                         total_size;
494
494
     int                                  cvt_len;
495
495
     struct directory                   * finddir;
496
 
     
 
496
    
497
497
     total_size = (dpnt->jsize + (SECTOR_SIZE - 1)) &  ~(SECTOR_SIZE - 1);
498
498
     directory_buffer = (char *) e_malloc(total_size);
499
499
     memset(directory_buffer, 0, total_size);
500
500
     dir_index = 0;
501
 
     
 
501
    
502
502
     s_entry = dpnt->jcontents;
503
 
     while(s_entry) 
 
503
     while(s_entry)
504
504
     {
505
505
             if(s_entry->de_flags & INHIBIT_JOLIET_ENTRY) {
506
506
                s_entry = s_entry->jnext;
507
507
                continue;
508
508
             }
509
 
                
 
509
        
510
510
             /*
511
511
              * If this entry was a directory that was relocated, we have a bit
512
512
              * of trouble here.  We need to dig out the real thing and put it
535
535
             {
536
536
                 s_entry1 = s_entry;
537
537
             }
538
 
              
539
 
             /* 
540
 
              * We do not allow directory entries to cross sector boundaries.  
541
 
              * Simply pad, and then start the next entry at the next sector 
 
538
             
 
539
             /*
 
540
              * We do not allow directory entries to cross sector boundaries. 
 
541
              * Simply pad, and then start the next entry at the next sector
542
542
              */
543
543
             new_reclen = s_entry1->jreclen;
544
544
             if( (dir_index & (SECTOR_SIZE - 1)) + new_reclen >= SECTOR_SIZE )
545
545
             {
546
 
                 dir_index = (dir_index + (SECTOR_SIZE - 1)) & 
 
546
                 dir_index = (dir_index + (SECTOR_SIZE - 1)) &
547
547
                     ~(SECTOR_SIZE - 1);
548
548
             }
549
 
             
 
549
            
550
550
             memcpy(&jrec, &s_entry1->isorec, sizeof(struct iso_directory_record) -
551
551
                    sizeof(s_entry1->isorec.name));
552
 
             
 
552
            
553
553
             cvt_len = joliet_strlen(s_entry1->name);
554
 
             
 
554
            
555
555
             /*
556
556
              * Fix the record length - this was the non-Joliet version we
557
557
              * were seeing.
558
558
              */
559
559
             jrec.name_len[0] = cvt_len;
560
560
             jrec.length[0] = s_entry1->jreclen;
561
 
             
 
561
            
562
562
             /*
563
563
              * If this is a directory, fix the correct size and extent
564
564
              * number.
565
565
              */
566
566
             if( (jrec.flags[0] & 2) != 0 )
567
567
             {
568
 
                 if(strcmp(s_entry1->name,".") == 0) 
 
568
                 if(strcmp(s_entry1->name,".") == 0)
569
569
                 {
570
570
                     jrec.name_len[0] = 1;
571
571
                     set_733((char *) jrec.extent, dpnt->jextent);
572
572
                     set_733((char *) jrec.size, ROUND_UP(dpnt->jsize));
573
573
                 }
574
 
                 else if(strcmp(s_entry1->name,"..") == 0) 
 
574
                 else if(strcmp(s_entry1->name,"..") == 0)
575
575
                 {
576
576
                     jrec.name_len[0] = 1;
577
577
                     if( dpnt->parent == reloc_dir )
600
600
                     {
601
601
                         if(finddir->self == s_entry1) break;
602
602
                         finddir = finddir->next;
603
 
                         if(!finddir) 
 
603
                         if(!finddir)
604
604
                         {
605
605
                             fprintf (stderr, _("Fatal goof - unable to find directory location\n"));
606
606
                             exit (1);
610
610
                     set_733((char *) jrec.size, ROUND_UP(finddir->jsize));
611
611
                 }
612
612
             }
613
 
             
614
 
             memcpy(directory_buffer + dir_index, &jrec, 
 
613
            
 
614
             memcpy(directory_buffer + dir_index, &jrec,
615
615
                    sizeof(struct iso_directory_record) -
616
616
                    sizeof(s_entry1->isorec.name));
617
 
             
618
 
             
619
 
             dir_index += sizeof(struct iso_directory_record) - 
 
617
            
 
618
            
 
619
             dir_index += sizeof(struct iso_directory_record) -
620
620
                 sizeof (s_entry1->isorec.name);
621
 
             
 
621
            
622
622
             /*
623
623
              * Finally dump the Unicode version of the filename.
624
624
              * Note - . and .. are the same as with non-Joliet discs.
625
625
              */
626
 
             if( (jrec.flags[0] & 2) != 0 
 
626
             if( (jrec.flags[0] & 2) != 0
627
627
                 && strcmp(s_entry1->name, ".") == 0 )
628
628
             {
629
629
                 directory_buffer[dir_index++] = 0;
630
630
             }
631
 
             else if( (jrec.flags[0] & 2) != 0 
 
631
             else if( (jrec.flags[0] & 2) != 0
632
632
                      && strcmp(s_entry1->name, "..") == 0 )
633
633
             {
634
634
                 directory_buffer[dir_index++] = 1;
640
640
                                    s_entry1->name);
641
641
                 dir_index += cvt_len;
642
642
             }
643
 
             
 
643
            
644
644
             if(dir_index & 1)
645
645
             {
646
646
                 directory_buffer[dir_index++] = 0;
648
648
 
649
649
             s_entry = s_entry->jnext;
650
650
     }
651
 
     
 
651
    
652
652
     if(dpnt->jsize != dir_index)
653
653
     {
654
654
         fprintf (stderr, _("Unexpected joliet directory length %d %d %s\n"),
655
655
                  dpnt->jsize, dir_index, dpnt->de_name);
656
656
     }
657
 
     
 
657
    
658
658
     xfwrite(directory_buffer, 1, total_size, outfile);
659
659
     last_extent_written += total_size >> 11;
660
660
     free(directory_buffer);
678
678
        {
679
679
          continue;
680
680
        }
681
 
          
 
681
         
682
682
      /*
683
683
       * First update the path table sizes for directories.
684
684
       *
690
690
       */
691
691
      if(s_entry->isorec.flags[0] ==  2)
692
692
        {
693
 
          if (strcmp(s_entry->name,".") && strcmp(s_entry->name,"..")) 
 
693
          if (strcmp(s_entry->name,".") && strcmp(s_entry->name,".."))
694
694
            {
695
695
              jpath_table_size += joliet_strlen(s_entry->name) + sizeof(struct iso_path_table) - 1;
696
 
              if (jpath_table_size & 1) 
 
696
              if (jpath_table_size & 1)
697
697
                {
698
698
                  jpath_table_size++;
699
699
                }
700
700
            }
701
 
          else 
 
701
          else
702
702
            {
703
703
              if (this_dir == root && strlen(s_entry->name) == 1)
704
704
                {
708
708
            }
709
709
        }
710
710
 
711
 
      if (strcmp(s_entry->name,".") && strcmp(s_entry->name,"..")) 
 
711
      if (strcmp(s_entry->name,".") && strcmp(s_entry->name,".."))
712
712
        {
713
713
          s_entry->jreclen =    sizeof(struct iso_directory_record)
714
714
            - sizeof(s_entry->isorec.name)
715
 
            + joliet_strlen(s_entry->name) 
 
715
            + joliet_strlen(s_entry->name)
716
716
            + 1;
717
717
        }
718
718
      else
737
737
  this_dir->jcontents = this_dir->contents;
738
738
  status = joliet_sort_directory(&this_dir->jcontents);
739
739
 
740
 
  /* 
 
740
  /*
741
741
   * Now go through the directory and figure out how large this one will be.
742
 
   * Do not split a directory entry across a sector boundary 
 
742
   * Do not split a directory entry across a sector boundary
743
743
   */
744
744
  s_entry = this_dir->jcontents;
745
745
/*
756
756
        }
757
757
 
758
758
      jreclen = s_entry->jreclen;
759
 
      
 
759
     
760
760
      if ((this_dir->jsize & (SECTOR_SIZE - 1)) + jreclen >= SECTOR_SIZE)
761
761
        {
762
 
          this_dir->jsize = (this_dir->jsize + (SECTOR_SIZE - 1)) & 
 
762
          this_dir->jsize = (this_dir->jsize + (SECTOR_SIZE - 1)) &
763
763
            ~(SECTOR_SIZE - 1);
764
764
        }
765
765
      this_dir->jsize += jreclen;
771
771
 * Similar to the iso9660 case, except here we perform a full sort based upon the
772
772
 * regular name of the file, not the 8.3 version.
773
773
 */
774
 
static int FDECL2(joliet_compare_dirs, const void *, rr, const void *, ll) 
 
774
static int FDECL2(joliet_compare_dirs, const void *, rr, const void *, ll)
775
775
{
776
776
     char * rpnt, *lpnt;
777
777
     struct directory_entry ** r, **l;
778
 
     
 
778
    
779
779
     r = (struct directory_entry **) rr;
780
780
     l = (struct directory_entry **) ll;
781
781
     rpnt = (*r)->name;
788
788
       {
789
789
         sort_goof++;
790
790
       }
791
 
     
 
791
    
792
792
     /*
793
793
      *  Put the '.' and '..' entries on the head of the sorted list.
794
794
      *  For normal ASCII, this always happens to be the case, but out of
800
800
     if( strcmp(rpnt, "..") == 0 ) return -1;
801
801
     if( strcmp(lpnt, "..") == 0 ) return  1;
802
802
 
803
 
     while(*rpnt && *lpnt) 
 
803
     while(*rpnt && *lpnt)
804
804
     {
805
805
          if(*rpnt == ';' && *lpnt != ';') return -1;
806
806
          if(*rpnt != ';' && *lpnt == ';') return 1;
807
 
          
 
807
         
808
808
          if(*rpnt == ';' && *lpnt == ';') return 0;
809
 
          
 
809
         
810
810
          /*
811
811
           * Extensions are not special here.  Don't treat the dot as something that
812
812
           * must be bumped to the start of the list.
815
815
          if(*rpnt == '.' && *lpnt != '.') return -1;
816
816
          if(*rpnt != '.' && *lpnt == '.') return 1;
817
817
#endif
818
 
          
 
818
         
819
819
          if(*rpnt < *lpnt) return -1;
820
820
          if(*rpnt > *lpnt) return 1;
821
821
          rpnt++;  lpnt++;
826
826
}
827
827
 
828
828
 
829
 
/* 
 
829
/*
830
830
 * Function:            sort_directory
831
831
 *
832
832
 * Purpose:             Sort the directory in the appropriate ISO9660
840
840
     int i;
841
841
     struct directory_entry * s_entry;
842
842
     struct directory_entry ** sortlist;
843
 
     
 
843
    
844
844
     s_entry = *sort_dir;
845
845
     while(s_entry)
846
846
     {
851
851
     }
852
852
 
853
853
     /*
854
 
      * OK, now we know how many there are.  Build a vector for sorting. 
 
854
      * OK, now we know how many there are.  Build a vector for sorting.
855
855
      */
856
 
     sortlist =   (struct directory_entry **) 
 
856
     sortlist =   (struct directory_entry **)
857
857
          e_malloc(sizeof(struct directory_entry *) * dcount);
858
858
 
859
859
     dcount = 0;
867
867
          }
868
868
          s_entry = s_entry->next;
869
869
     }
870
 
  
 
870
 
871
871
     sort_goof = 0;
872
872
#ifdef  __STDC__
873
 
     qsort(sortlist, dcount, sizeof(struct directory_entry *), 
 
873
     qsort(sortlist, dcount, sizeof(struct directory_entry *),
874
874
           (int (*)(const void *, const void *))joliet_compare_dirs);
875
875
#else
876
 
     qsort(sortlist, dcount, sizeof(struct directory_entry *), 
 
876
     qsort(sortlist, dcount, sizeof(struct directory_entry *),
877
877
           joliet_compare_dirs);
878
878
#endif
879
 
     
880
 
     /* 
881
 
      * Now reassemble the linked list in the proper sorted order 
 
879
    
 
880
     /*
 
881
      * Now reassemble the linked list in the proper sorted order
882
882
      */
883
883
     for(i=0; i<dcount-1; i++)
884
884
     {
887
887
 
888
888
     sortlist[dcount-1]->jnext = NULL;
889
889
     *sort_dir = sortlist[0];
890
 
     
 
890
    
891
891
     free(sortlist);
892
892
     return sort_goof;
893
893
}
934
934
            }
935
935
        }
936
936
      /* skip if hidden - but not for the rr_moved dir */
937
 
      if(dpnt->subdir && (!(dpnt->dir_flags & INHIBIT_JOLIET_ENTRY) || dpnt == reloc_dir)) 
 
937
      if(dpnt->subdir && (!(dpnt->dir_flags & INHIBIT_JOLIET_ENTRY) || dpnt == reloc_dir))
938
938
        generate_joliet_directories(dpnt->subdir, outfile);
939
939
      dpnt = dpnt->next;
940
940
    }
947
947
static int FDECL1(jpathtab_write, FILE *, outfile)
948
948
{
949
949
  /*
950
 
   * Next we write the path tables 
 
950
   * Next we write the path tables
951
951
   */
952
952
  xfwrite(jpath_table_l, 1, jpath_blocks << 11, outfile);
953
953
  xfwrite(jpath_table_m, 1, jpath_blocks << 11, outfile);
995
995
  struct iso_primary_descriptor jvol_desc;
996
996
 
997
997
  /*
998
 
   * Next we write out the boot volume descriptor for the disc 
 
998
   * Next we write out the boot volume descriptor for the disc
999
999
   */
1000
1000
  jvol_desc = vol_desc;
1001
1001
  get_joliet_vol_desc(&jvol_desc);
1013
1013
  jpath_table[1] = 0;
1014
1014
  jpath_table[2] = jpath_table[0] + jpath_blocks;
1015
1015
  jpath_table[3] = 0;
1016
 
  
 
1016
 
1017
1017
  last_extent += 2*jpath_blocks;
1018
1018
  return 0;
1019
1019
}