diff --git a/libisofs/ecma119.c b/libisofs/ecma119.c index c149096..be42733 100644 --- a/libisofs/ecma119.c +++ b/libisofs/ecma119.c @@ -90,14 +90,8 @@ void ecma119_image_free(Ecma119Image *t) writer->free_data(writer); free(writer); } - -#ifdef Libisofs_with_rr_reloc_diR - if (t->rr_reloc_dir != NULL) free(t->rr_reloc_dir); - -#endif /* Libisofs_with_rr_reloc_diR */ - if (t->input_charset != NULL) free(t->input_charset); if (t->output_charset != NULL) @@ -1721,9 +1715,6 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img) target->rrip_1_10_px_ino = opts->rrip_1_10_px_ino; target->aaip_susp_1_10 = opts->aaip_susp_1_10; target->dir_rec_mtime = opts->dir_rec_mtime; - -#ifdef Libisofs_with_rr_reloc_diR - target->rr_reloc_dir = NULL; if (opts->rr_reloc_dir != NULL) { target->rr_reloc_dir = strdup(opts->rr_reloc_dir); @@ -1734,9 +1725,6 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img) } target->rr_reloc_flags = opts->rr_reloc_flags; target->rr_reloc_node = NULL; - -#endif /* Libisofs_with_rr_reloc_diR */ - target->sort_files = opts->sort_files; target->replace_uid = opts->replace_uid ? 1 : 0; @@ -2509,8 +2497,6 @@ int bs_set_size(struct burn_source *bs, off_t size) return 1; } -#ifdef Libisofs_with_rr_reloc_diR - static int dive_to_depth_8(IsoDir *dir, int depth) { @@ -2569,9 +2555,6 @@ int make_reloc_dir_if_needed(IsoImage *img, IsoWriteOpts *opts, int flag) return 1; } -#endif /* Libisofs_with_rr_reloc_diR */ - - int iso_image_create_burn_source(IsoImage *image, IsoWriteOpts *opts, struct burn_source **burn_src) { @@ -2588,8 +2571,6 @@ int iso_image_create_burn_source(IsoImage *image, IsoWriteOpts *opts, return ISO_OUT_OF_MEM; } -#ifdef Libisofs_with_rr_reloc_diR - if (!opts->allow_deep_paths) { ret = make_reloc_dir_if_needed(image, opts, 0); if (ret < 0) { @@ -2598,8 +2579,6 @@ int iso_image_create_burn_source(IsoImage *image, IsoWriteOpts *opts, } } -#endif /* Libisofs_with_rr_reloc_diR */ - ret = ecma119_image_new(image, opts, &target); if (ret < 0) { free(source); @@ -2715,14 +2694,8 @@ int iso_write_opts_new(IsoWriteOpts **opts, int profile) wopts->fat = 0; wopts->fifo_size = 1024; /* 2 MB buffer */ wopts->sort_files = 1; /* file sorting is always good */ - -#ifdef Libisofs_with_rr_reloc_diR - wopts->rr_reloc_dir = NULL; wopts->rr_reloc_flags = 0; - -#endif /* Libisofs_with_rr_reloc_diR */ - wopts->system_area_data = NULL; wopts->system_area_options = 0; wopts->vol_creation_time = 0; @@ -2765,14 +2738,8 @@ void iso_write_opts_free(IsoWriteOpts *opts) return; } free(opts->output_charset); - -#ifdef Libisofs_with_rr_reloc_diR - if (opts->rr_reloc_dir != NULL) free(opts->rr_reloc_dir); - -#endif /* Libisofs_with_rr_reloc_diR */ - if (opts->system_area_data != NULL) free(opts->system_area_data); if (opts->prep_partition != NULL) diff --git a/libisofs/ecma119_tree.c b/libisofs/ecma119_tree.c index 2133b39..358c5bf 100644 --- a/libisofs/ecma119_tree.c +++ b/libisofs/ecma119_tree.c @@ -153,16 +153,10 @@ needs_transl:; int ecma119_is_dedicated_reloc_dir(Ecma119Image *img, Ecma119Node *node) { - -#ifdef Libisofs_with_rr_reloc_diR - if (img->rr_reloc_node == node && node != img->root && node != img->partition_root && (img->rr_reloc_flags & 2)) return 1; - -#endif /* Libisofs_with_rr_reloc_diR */ - return 0; } @@ -474,9 +468,6 @@ int create_tree(Ecma119Image *image, IsoNode *iso, Ecma119Node **tree, if (ret < 0) { goto ex; } - -#ifdef Libisofs_with_rr_reloc_diR - if (depth == 1) { /* root is default */ image->rr_reloc_node = node; } else if (depth == 2) { @@ -486,10 +477,6 @@ int create_tree(Ecma119Image *image, IsoNode *iso, Ecma119Node **tree, strcmp(iso->name, image->rr_reloc_dir) == 0) image->rr_reloc_node = node; } - -#endif /* Libisofs_with_rr_reloc_diR */ - - } ret = ISO_SUCCESS; pos = dir->children; @@ -962,9 +949,6 @@ int reorder_tree(Ecma119Image *img, Ecma119Node *dir, max_path = pathlen + 1 + max_child_name_len(dir); if (level > 8 || max_path > 255) { - -#ifdef Libisofs_with_rr_reloc_diR - reloc = img->rr_reloc_node; if (reloc == NULL) { if (img->eff_partition_offset > 0) { @@ -973,17 +957,6 @@ int reorder_tree(Ecma119Image *img, Ecma119Node *dir, reloc = img->root; } } - -#else - - if (img->eff_partition_offset > 0) { - reloc = img->partition_root; - } else { - reloc = img->root; - } - -#endif /* ! Libisofs_with_rr_reloc_diR */ - ret = reparent(dir, reloc); if (ret < 0) { return ret; @@ -1238,13 +1211,7 @@ int ecma119_tree_create(Ecma119Image *img) * above could insert new directories into the relocation directory. * Note that recurse = 0, as we don't need to recurse. */ - -#ifdef Libisofs_with_rr_reloc_diR ret = mangle_tree(img, img->rr_reloc_node, 0); -#else - ret = mangle_tree(img, NULL, 0); -#endif - if (ret < 0) { return ret; } diff --git a/libisofs/libisofs.h b/libisofs/libisofs.h index c6ac7e2..8ded7c9 100644 --- a/libisofs/libisofs.h +++ b/libisofs/libisofs.h @@ -7627,11 +7627,6 @@ struct burn_source { /* currently none being tested */ -/* Perform the operations promised by iso_write_opts_set_rr_reloc() */ -#define Libisofs_with_rr_reloc_diR yes - - - /* ---------------------------- Experiments ---------------------------- */ diff --git a/libisofs/rockridge.c b/libisofs/rockridge.c index 0fb271e..4f9e1d3 100644 --- a/libisofs/rockridge.c +++ b/libisofs/rockridge.c @@ -1246,17 +1246,11 @@ size_t rrip_calc_len(Ecma119Image *t, Ecma119Node *n, int type, size_t used_up, /* we need to add a RE entry */ su_size += 4; } - -#ifdef Libisofs_with_rr_reloc_diR - } else if(ecma119_is_dedicated_reloc_dir(t, n) && (t->rr_reloc_flags & 1)) { /* The dedicated relocation directory shall be marked by RE */ su_size += 4; } - -#endif /* Libisofs_with_rr_reloc_diR */ - } else if (n->type == ECMA119_SPECIAL) { if (S_ISBLK(n->node->mode) || S_ISCHR(n->node->mode)) { /* block or char device, we need a PN entry */ @@ -1442,18 +1436,12 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type, goto add_susp_cleanup; } } - -#ifdef Libisofs_with_rr_reloc_diR - } else if(ecma119_is_dedicated_reloc_dir(t, n) && (t->rr_reloc_flags & 1)) { /* The dedicated relocation directory shall be marked by RE */ ret = rrip_add_RE(t, node, info); if (ret < 0) goto add_susp_cleanup; - -#endif /* Libisofs_with_rr_reloc_diR */ - } } else if (n->type == ECMA119_SPECIAL) { if (S_ISBLK(n->node->mode) || S_ISCHR(n->node->mode)) {