Expose Joliet.

This commit is contained in:
Vreixo Formoso 2008-01-08 16:10:25 +01:00
parent 5475502dc8
commit 5d81305042
5 changed files with 24 additions and 4 deletions

View File

@ -30,8 +30,10 @@ int main(int argc, char **argv)
Ecma119WriteOpts opts = {
1, /* level */
1, /* rockridge */
1, /* joliet */
0, /* omit_version_numbers */
0, /* allow_deep_paths */
0, /* joliet_longer_paths */
0, /* sort files */
0, /* replace_dir_mode */
0, /* replace_file_mode */

View File

@ -30,8 +30,10 @@ int main(int argc, char **argv)
Ecma119WriteOpts opts = {
1, /* level */
1, /* rockridge */
0, /* joliet */
0, /* omit_version_numbers */
0, /* allow_deep_paths */
0, /* joliet_longer_paths */
1, /* sort files */
0, /* replace_dir_mode */
0, /* replace_file_mode */

View File

@ -30,8 +30,10 @@ int main(int argc, char **argv)
Ecma119WriteOpts opts = {
1, /* level */
1, /* rockridge */
0, /* joliet */
0, /* omit_version_numbers */
0, /* allow_deep_paths */
0, /* joliet_longer_paths */
1, /* sort files */
0, /* replace_dir_mode */
0, /* replace_file_mode */

View File

@ -9,6 +9,7 @@
#include "libisofs.h"
#include "ecma119.h"
#include "joliet.h"
#include "ecma119_tree.h"
#include "error.h"
#include "filesrc.h"
@ -825,11 +826,11 @@ int ecma119_image_new(IsoImage *src, Ecma119WriteOpts *opts, Ecma119Image **img)
target->iso_level = opts->level;
target->rockridge = opts->rockridge;
target->joliet = 0; //TODO opts->joliet;
target->joliet = opts->joliet;
target->ino = 0;
target->omit_version_numbers = opts->omit_version_numbers;
target->allow_deep_paths = opts->allow_deep_paths;
target->joliet_longer_paths = 0; //TODO
target->joliet_longer_paths = opts->joliet_longer_paths;
target->sort_files = opts->sort_files;
target->replace_uid = opts->replace_uid ? 1 : 0;
@ -878,6 +879,11 @@ int ecma119_image_new(IsoImage *src, Ecma119WriteOpts *opts, Ecma119Image **img)
/* the number of writers is dependent of the extensions */
nwriters = 1 + 1 + 1; /* ECMA-119 + padding + files */
if (target->joliet) {
nwriters++;
}
target->writers = malloc(nwriters * sizeof(void*));
if (target->writers == NULL) {
iso_image_unref(src);
@ -891,11 +897,17 @@ int ecma119_image_new(IsoImage *src, Ecma119WriteOpts *opts, Ecma119Image **img)
goto target_cleanup;
}
voldesc_size = target->curblock - target->ms_block - 16;
/* create writer for Joliet structure */
ret = joliet_writer_create(target);
if (ret < 0) {
goto target_cleanup;
}
/* Volume Descriptor Set Terminator */
target->curblock++;
voldesc_size = target->curblock - target->ms_block - 16;
/*
* Create the writer for possible padding to ensure that in case of image
* growing we can safety overwrite the first 64 KiB of image.

View File

@ -65,10 +65,12 @@ typedef struct
/** Which extensions to support. */
unsigned int rockridge :1;
unsigned int joliet :1;
/* relaxed constraints */
unsigned int omit_version_numbers :1;
unsigned int allow_deep_paths :1;
unsigned int joliet_longer_paths :1;
//int relaxed_constraints; /**< see ecma119_relaxed_constraints_flag */
//unsigned int copy_eltorito:1;