Module Name:    src
Committed By:   tsutsui
Date:           Fri May 31 20:46:19 UTC 2024

Modified Files:
        src/external/gpl2/mkhybrid/dist: mkisofs.c mkisofs.h tree.c

Log Message:
Pull options -hide-joliet-trans-tbl and -hide-rr-moved from mkisofs-1.13.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/mkhybrid/dist/mkisofs.c \
    src/external/gpl2/mkhybrid/dist/mkisofs.h
cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/tree.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl2/mkhybrid/dist/mkisofs.c
diff -u src/external/gpl2/mkhybrid/dist/mkisofs.c:1.4 src/external/gpl2/mkhybrid/dist/mkisofs.c:1.5
--- src/external/gpl2/mkhybrid/dist/mkisofs.c:1.4	Fri May 31 20:36:24 2024
+++ src/external/gpl2/mkhybrid/dist/mkisofs.c	Fri May 31 20:46:19 2024
@@ -104,6 +104,8 @@ char * boot_image = BOOT_IMAGE_DEFAULT;
 int volume_set_size = 1;
 int volume_sequence_number = 1;
 
+int jhide_trans_tbl;            /* Hide TRANS.TBL from Joliet tree */
+int hide_rr_moved;              /* Name RR_MOVED .rr_moved in Rock Ridge tree */
 int omit_period = 0;             /* Violates iso9660, but these are a pain */
 int transparent_compression = 0; /* So far only works with linux */
 int omit_version_number = 0;     /* May violate iso9660, but noone uses vers*/
@@ -204,6 +206,20 @@ struct ld_option
 #define OPTION_I_HIDE			163
 #define OPTION_J_HIDE			164
 #define OPTION_LOG_FILE			165
+#if 0
+#define OPTION_PVERSION			166
+#define OPTION_NOBAK			167
+#define OPTION_SPARCLABEL		168
+#define OPTION_HARD_DISK_BOOT		169
+#define OPTION_NO_EMUL_BOOT		170
+#define OPTION_NO_BOOT			171
+#define OPTION_BOOT_LOAD_ADDR		172
+#define OPTION_BOOT_LOAD_SIZE		173
+#define OPTION_BOOT_INFO_TABLE		174
+#endif
+#define OPTION_HIDE_TRANS_TBL		175
+#define OPTION_HIDE_RR_MOVED		176
+
 #ifdef APPLE_HYB
 #define OPTION_CAP			200
 #define OPTION_NETA			201
@@ -282,6 +298,10 @@ static const struct ld_option ld_options
   /* NON-HFS change */
   { {"hide-joliet-list", required_argument, NULL, OPTION_J_LIST},
       '\0', "FILE", "List of Joliet files to hide" , ONE_DASH },
+  {{"hide-joliet-trans-tbl", no_argument, NULL, OPTION_HIDE_TRANS_TBL},
+      '\0', NULL, "Hide TRANS.TBL from Joliet tree", ONE_DASH},
+  {{"hide-rr-moved", no_argument, NULL, OPTION_HIDE_RR_MOVED},
+      '\0', NULL, "Rename RR_MOVED to .rr_moved in Rock Ridge tree", ONE_DASH},
 #endif /* APPLE_HYB */
   { {NULL, required_argument, NULL, 'i'},
       'i', "ADD_FILES", "No longer supported" , TWO_DASHES },
@@ -1014,6 +1034,12 @@ int FDECL2(main, int, argc, char **, arg
       case OPTION_J_HIDE:
 	j_add_match(optarg);
 	break;
+      case OPTION_HIDE_TRANS_TBL:
+	jhide_trans_tbl++;
+	break;
+      case OPTION_HIDE_RR_MOVED:
+	hide_rr_moved++;
+	break;
       case OPTION_HELP:
 	usage ();
 	exit (0);
Index: src/external/gpl2/mkhybrid/dist/mkisofs.h
diff -u src/external/gpl2/mkhybrid/dist/mkisofs.h:1.4 src/external/gpl2/mkhybrid/dist/mkisofs.h:1.5
--- src/external/gpl2/mkhybrid/dist/mkisofs.h:1.4	Fri May 31 20:44:36 2024
+++ src/external/gpl2/mkhybrid/dist/mkisofs.h	Fri May 31 20:46:19 2024
@@ -293,6 +293,8 @@ extern int all_files;
 extern int generate_tables;
 extern int print_size;
 extern int split_output;
+extern int jhide_trans_tbl;
+extern int hide_rr_moved;
 extern int omit_period;
 extern int omit_version_number;
 extern int transparent_compression;

Index: src/external/gpl2/mkhybrid/dist/tree.c
diff -u src/external/gpl2/mkhybrid/dist/tree.c:1.1 src/external/gpl2/mkhybrid/dist/tree.c:1.2
--- src/external/gpl2/mkhybrid/dist/tree.c:1.1	Fri May 31 19:49:02 2024
+++ src/external/gpl2/mkhybrid/dist/tree.c	Fri May 31 20:46:19 2024
@@ -407,7 +407,8 @@ got_valid_name:      
       set_733((char *) table->isorec.size, tablesize);
       table->size = tablesize;
       table->filedir = this_dir;
-      table->de_flags    |= INHIBIT_JOLIET_ENTRY;
+      if (jhide_trans_tbl)
+         table->de_flags    |= INHIBIT_JOLIET_ENTRY;
       table->name = strdup("<translation table>");
       table->table = (char *) e_malloc(ROUND_UP(tablesize));
       memset(table->table, 0, ROUND_UP(tablesize));
@@ -605,8 +606,13 @@ static void generate_reloc_directory()
 	reloc_dir->next = root->subdir;
 	root->subdir = reloc_dir;
 	reloc_dir->depth = 1;
-	reloc_dir->whole_name = strdup("./rr_moved");
-	reloc_dir->de_name =  strdup("rr_moved");
+	if (hide_rr_moved) {
+		reloc_dir->whole_name = strdup("./.rr_moved");
+		reloc_dir->de_name = strdup(".rr_moved");
+	} else {
+		reloc_dir->whole_name = strdup("./rr_moved");
+		reloc_dir->de_name =  strdup("rr_moved");
+	}
 	reloc_dir->extent = 0;
 	
 	
@@ -638,8 +644,8 @@ static void generate_reloc_directory()
 		fstatbuf.st_mode = 0555 | S_IFDIR;
 		fstatbuf.st_nlink = 2;
 		generate_rock_ridge_attributes("",
-					       "rr_moved", s_entry,
-					       &fstatbuf, &fstatbuf, 0);
+			hide_rr_moved ? ".rr_moved" : "rr_moved",
+			s_entry, &fstatbuf, &fstatbuf, 0);
 	};
 	
 	/* Now create the . and .. entries in rr_moved */

Reply via email to