"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libisofs/ecma119.c" between
xorriso-1.5.2.tar.gz and xorriso-1.5.4.tar.gz

About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.

ecma119.c  (xorriso-1.5.2):ecma119.c  (xorriso-1.5.4)
skipping to change at line 759 skipping to change at line 759
} }
} }
} }
return ISO_SUCCESS; return ISO_SUCCESS;
} }
static static
int write_path_table(Ecma119Image *t, Ecma119Node **pathlist, int l_type) int write_path_table(Ecma119Image *t, Ecma119Node **pathlist, int l_type)
{ {
size_t i, len; size_t i, len;
uint8_t buf[64]; /* 64 is just a convenient size larger enought */ uint8_t buf[64]; /* 64 is just a convenient size larger enough */
struct ecma119_path_table_record *rec; struct ecma119_path_table_record *rec;
void (*write_int)(uint8_t*, uint32_t, int); void (*write_int)(uint8_t*, uint32_t, int);
Ecma119Node *dir; Ecma119Node *dir;
uint32_t path_table_size; uint32_t path_table_size;
int parent = 0; int parent = 0;
int ret= ISO_SUCCESS; int ret= ISO_SUCCESS;
uint8_t *zeros = NULL; uint8_t *zeros = NULL;
path_table_size = 0; path_table_size = 0;
write_int = l_type ? iso_lsb : iso_msb; write_int = l_type ? iso_lsb : iso_msb;
skipping to change at line 1371 skipping to change at line 1371
vol->vol_desc_version[0] = 1; vol->vol_desc_version[0] = 1;
ret = iso_write(target, buf, BLOCK_SIZE); ret = iso_write(target, buf, BLOCK_SIZE);
ex: ex:
LIBISO_FREE_MEM(buf); LIBISO_FREE_MEM(buf);
return ret; return ret;
} }
/* @param flag bit0= initialize system area by target->opts_overwrite /* @param flag bit0= initialize system area by target->opts_overwrite
bit1= fifo is not yet draining. Inquire write_count from fifo. bit1= fifo is not yet draining. Inquire write_count from fifo.
bit2= target->opts->ms_block is not counted in
target->total_size
*/ */
static static
int write_head_part1(Ecma119Image *target, int *write_count, int flag) int write_head_part1(Ecma119Image *target, int *write_count, int flag)
{ {
int res, i, ret; int res, i, ret;
uint8_t *sa, *sa_local = NULL; uint8_t *sa, *sa_local = NULL;
IsoImageWriter *writer; IsoImageWriter *writer;
size_t buffer_size = 0, buffer_free = 0, buffer_start_free = 0; size_t buffer_size = 0, buffer_free = 0, buffer_start_free = 0;
if (target->sys_area_already_written) { if (target->sys_area_already_written) {
skipping to change at line 1393 skipping to change at line 1395
} else { } else {
sa = target->sys_area_as_written; sa = target->sys_area_as_written;
target->sys_area_already_written = 1; target->sys_area_already_written = 1;
} }
iso_ring_buffer_get_buf_status(target->buffer, &buffer_size, iso_ring_buffer_get_buf_status(target->buffer, &buffer_size,
&buffer_start_free); &buffer_start_free);
*write_count = 0; *write_count = 0;
/* Write System Area (ECMA-119, 6.2.1) */ /* Write System Area (ECMA-119, 6.2.1) */
if ((flag & 1) && target->opts_overwrite != NULL) if ((flag & 1) && target->opts_overwrite != NULL)
memcpy(sa, target->opts_overwrite, 16 * BLOCK_SIZE); memcpy(sa, target->opts_overwrite, 16 * BLOCK_SIZE);
res = iso_write_system_area(target, sa); res = iso_write_system_area(target, sa, (flag & 4) >> 2);
if (res < 0) if (res < 0)
goto write_error; goto write_error;
res = iso_write(target, sa, 16 * BLOCK_SIZE); res = iso_write(target, sa, 16 * BLOCK_SIZE);
if (res < 0) if (res < 0)
goto write_error; goto write_error;
*write_count = 16; *write_count = 16;
/* write volume descriptors, one per writer */ /* write volume descriptors, one per writer */
iso_msg_debug(target->image->id, "Write volume descriptors"); iso_msg_debug(target->image->id, "Write volume descriptors");
for (i = 0; i < (int) target->nwriters; ++i) { for (i = 0; i < (int) target->nwriters; ++i) {
skipping to change at line 1461 skipping to change at line 1463
goto ex; goto ex;
} }
/* Write volume descriptors subtracting /* Write volume descriptors subtracting
target->partiton_offset from any LBA pointer. target->partiton_offset from any LBA pointer.
*/ */
target->eff_partition_offset = target->opts->partition_offset; target->eff_partition_offset = target->opts->partition_offset;
target->pvd_size_is_total_size = 0; target->pvd_size_is_total_size = 0;
for (i = 0; i < (int) target->nwriters; ++i) { for (i = 0; i < (int) target->nwriters; ++i) {
writer = target->writers[i]; writer = target->writers[i];
/* Not all writers have an entry in the partion volume descriptor set. /* Not all writers have an entry in the partition volume descriptor set.
It must be guaranteed that they write exactly one block. It must be guaranteed that they write exactly one block.
*/ */
/* >>> TWINTREE: Enhance ISO1999 writer and add it here */ /* >>> TWINTREE: Enhance ISO1999 writer and add it here */
if(writer->write_vol_desc != ecma119_writer_write_vol_desc && if(writer->write_vol_desc != ecma119_writer_write_vol_desc &&
writer->write_vol_desc != joliet_writer_write_vol_desc) writer->write_vol_desc != joliet_writer_write_vol_desc)
continue; continue;
ret = writer->write_vol_desc(writer); ret = writer->write_vol_desc(writer);
if (ret < 0) if (ret < 0)
skipping to change at line 1497 skipping to change at line 1499
free(buf); free(buf);
return ret; return ret;
} }
static static
int write_head_part(Ecma119Image *target, int flag) int write_head_part(Ecma119Image *target, int flag)
{ {
int res, write_count = 0; int res, write_count = 0;
/* System area and volume descriptors */ /* System area and volume descriptors */
res = write_head_part1(target, &write_count, 0); res = write_head_part1(target, &write_count, 4);
if (res < 0) if (res < 0)
return res; return res;
/* Write superblock checksum tag */ /* Write superblock checksum tag */
if (target->opts->md5_session_checksum && target->checksum_ctx != NULL) { if (target->opts->md5_session_checksum && target->checksum_ctx != NULL) {
res = iso_md5_write_tag(target, 2); res = iso_md5_write_tag(target, 2);
if (res < 0) if (res < 0)
return res; return res;
write_count++; write_count++;
} }
skipping to change at line 2692 skipping to change at line 2694
} }
target->have_appended_partitions = 0; target->have_appended_partitions = 0;
for (i = 0; i < ISO_HFSPLUS_BLESS_MAX; i++) { for (i = 0; i < ISO_HFSPLUS_BLESS_MAX; i++) {
target->hfsplus_blessed[i] = src->hfsplus_blessed[i]; target->hfsplus_blessed[i] = src->hfsplus_blessed[i];
if (target->hfsplus_blessed[i] != NULL) if (target->hfsplus_blessed[i] != NULL)
iso_node_ref(target->hfsplus_blessed[i]); iso_node_ref(target->hfsplus_blessed[i]);
} }
target->hfsp_cat_node_size = 0; target->hfsp_cat_node_size = 0;
target->hfsp_iso_block_fac = 0; target->hfsp_iso_block_fac = 0;
target->hfsp_collision_count = 0; target->hfsp_collision_count = 0;
iso_setup_hfsplus_block_size(target);
target->apm_req_count = 0; target->apm_req_count = 0;
target->apm_req_flags = 0; target->apm_req_flags = 0;
for (i = 0; i < ISO_APM_ENTRIES_MAX; i++) for (i = 0; i < ISO_APM_ENTRIES_MAX; i++)
target->apm_req[i] = NULL; target->apm_req[i] = NULL;
for (i = 0; i < ISO_MBR_ENTRIES_MAX; i++) for (i = 0; i < ISO_MBR_ENTRIES_MAX; i++)
target->mbr_req[i] = NULL; target->mbr_req[i] = NULL;
target->mbr_req_count = 0; target->mbr_req_count = 0;
for (i = 0; i < ISO_GPT_ENTRIES_MAX; i++) for (i = 0; i < ISO_GPT_ENTRIES_MAX; i++)
target->gpt_req[i] = NULL; target->gpt_req[i] = NULL;
target->gpt_req_count = 0; target->gpt_req_count = 0;
skipping to change at line 3001 skipping to change at line 3004
filesrc_writer_compute_data_blocks(). filesrc_writer_compute_data_blocks().
*/ */
ret = filesrc_writer_pre_compute(target->writers[file_src_writer_index]); ret = filesrc_writer_pre_compute(target->writers[file_src_writer_index]);
if (ret < 0) if (ret < 0)
goto target_cleanup; goto target_cleanup;
/* /*
* 3. * 3.
* Call compute_data_blocks() in each Writer. * Call compute_data_blocks() in each Writer.
* That function computes the size needed by its structures and * That function computes the size needed by its structures and
* increments image current block propertly. * increments image current block properly.
*/ */
for (i = 0; i < (int) target->nwriters; ++i) { for (i = 0; i < (int) target->nwriters; ++i) {
IsoImageWriter *writer = target->writers[i]; IsoImageWriter *writer = target->writers[i];
if (target->gpt_backup_outside && if (target->gpt_backup_outside &&
writer->write_vol_desc == gpt_tail_writer_write_vol_desc) writer->write_vol_desc == gpt_tail_writer_write_vol_desc)
continue; continue;
/* Exposing address of data start to IsoWriteOpts and memorizing /* Exposing address of data start to IsoWriteOpts and memorizing
this address for all files which have no block address: this address for all files which have no block address:
skipping to change at line 4389 skipping to change at line 4392
return ISO_SUCCESS; return ISO_SUCCESS;
} }
/* /*
* @param flag * @param flag
* Bitfield for control purposes. * Bitfield for control purposes.
* bit0-bit7= Name space * bit0-bit7= Name space
* 0= generic (to_charset is valid, no reserved characters, * 0= generic (to_charset is valid, no reserved characters,
* no length limits) * no length limits)
* 1= Rock Ridge (to_charset is valid) * 1= Rock Ridge (to_charset is valid)
* 2= Joliet (to_charset gets overriden by UCS-2 or UTF-16) * 2= Joliet (to_charset gets overridden by UCS-2 or UTF-16)
* 3= ECMA-119 (dull ISO 9660 character set) * 3= ECMA-119 (dull ISO 9660 character set)
* 4= HFS+ (to_charset gets overridden by UTF-16BE) * 4= HFS+ (to_charset gets overridden by UTF-16BE)
* bit8= Treat input text as directory name * bit8= Treat input text as directory name
* (matters for Joliet and ECMA-119) * (matters for Joliet and ECMA-119)
* bit9= Do not issue error messages * bit9= Do not issue error messages
* bit15= Reverse operation (best to be done only with results of * bit15= Reverse operation (best to be done only with results of
* previous conversions) * previous conversions)
*/ */
int iso_conv_name_chars(IsoWriteOpts *opts, char *in_name, size_t name_len, int iso_conv_name_chars(IsoWriteOpts *opts, char *in_name, size_t name_len,
char **result, size_t *result_len, int flag) char **result, size_t *result_len, int flag)
 End of changes. 8 change blocks. 
6 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)