New API call isoburn_igopt_set_untranslated_name_len()

master
Thomas Schmitt 12 years ago
parent 4803a31fa4
commit 2e64464c7c
  1. 44
      libisoburn/isoburn.c
  2. 9
      libisoburn/isoburn.h
  3. 31
      libisoburn/libisoburn.h
  4. 2
      libisoburn/libisoburn.ver
  5. 2
      xorriso/xorriso_timestamp.h

@ -465,6 +465,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
if(opts->hardlinks)
iso_write_opts_set_rrip_1_10_px_ino(wopts, 1);
iso_write_opts_set_aaip(wopts, opts->aaip);
iso_write_opts_set_untranslated_name_len(wopts, opts->untranslated_name_len);
iso_write_opts_set_omit_version_numbers(wopts, opts->omit_version_numbers);
iso_write_opts_set_allow_deep_paths(wopts, opts->allow_deep_paths);
iso_write_opts_set_allow_longer_paths(wopts, opts->allow_longer_paths);
@ -932,6 +933,7 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
o->iso1999= 0;
o->hardlinks= 0;
o->aaip = 0;
o->untranslated_name_len = 0;
o->omit_version_numbers= 0;
o->allow_deep_paths= 1;
o->allow_longer_paths= 0;
@ -1054,10 +1056,48 @@ int isoburn_igopt_get_relaxed(struct isoburn_imgen_opts *o, int *relax)
{
*relax= (!!o->omit_version_numbers) | ((!!o->allow_deep_paths)<<1) |
((!!o->allow_longer_paths)<<2) | ((!!o->max_37_char_filenames)<<3) |
((!!o->no_force_dots)<<4) | ((!!o->allow_lowercase)<<5) |
((!!(o->no_force_dots & 1))<<4)| ((!!o->allow_lowercase)<<5) |
((!!o->allow_full_ascii)<<6) | ((!!o->joliet_longer_paths)<<7) |
((!!o->always_gmt)<<8) | ((!!o->rrip_version_1_10)<<9) |
((!!o->dir_rec_mtime)<<10) | ((!!o->aaip_susp_1_10)<<11);
((!!o->dir_rec_mtime)<<10) | ((!!o->aaip_susp_1_10)<<11) |
((!!(o->omit_version_numbers & 2))<<12) |
((!!(o->no_force_dots & 2))<<13);
return(1);
}
int isoburn_igopt_set_untranslated_name_len(struct isoburn_imgen_opts *o,
int len)
{
int ret;
IsoWriteOpts *opts = NULL;
char msg[160];
ret= iso_write_opts_new(&opts, 0);
if(ret < 0) {
isoburn_msgs_submit(NULL, 0x00060000,
"Cannot create libisofs write options object", 0, "FATAL", 0);
return(0);
}
ret= iso_write_opts_set_untranslated_name_len(opts, len);
if(ret < 0) {
ret= iso_write_opts_set_untranslated_name_len(opts, -1);
sprintf(msg,
"Improper value for maximum length of untranslated names (%d <-> -1 ... %d)",
len, ret);
isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "FAILURE", 0);
iso_write_opts_free(opts);
return(0);
}
o->untranslated_name_len= ret; /* Normalized len value */
iso_write_opts_free(opts);
return(1);
}
int isoburn_igopt_get_untranslated_name_len(struct isoburn_imgen_opts *o,
int *len)
{
*len = o->untranslated_name_len;
return(1);
}

@ -386,6 +386,15 @@ struct isoburn_imgen_opts {
* but it is supposed to work on most moderns systems. Use with caution.
*/
/*
* Extra Caution: This option breaks any assumptions about names that
* are supported by ECMA-119 specifications.
* Omit any translation which would make a file name compliant to the
* ECMA-119 rules. This includes and exceeds omit_version_numbers,
* max_37_char_filenames, no_force_dots bit0, allow_lowercase.
*/
unsigned int untranslated_name_len;
/**
* Omit the version number (";1") at the end of the ISO-9660 identifiers.
* Version numbers are usually not used.

@ -1109,6 +1109,35 @@ int isoburn_igopt_set_relaxed(struct isoburn_imgen_opts *o, int relax);
int isoburn_igopt_get_relaxed(struct isoburn_imgen_opts *o, int *relax);
/** Caution: This option breaks any assumptions about names that
are supported by ECMA-119 specifications.
Try to omit any translation which would make a file name compliant to the
ECMA-119 rules. This includes and exceeds omit_version_numbers,
max_37_char_filenames, no_force_dots bit0, allow_full_ascii. Further it
prevents the conversion from local character set to ASCII.
The maximum name length is given by this call. If a filename exceeds
this length or cannot be recorded untranslated for other reasons, then
image production gets aborted.
Currently the length limit is 96 characters, because an ECMA-119 directory
record may at most have 254 bytes and up to 158 other bytes must fit into
the record. Probably 96 more bytes can be made free for the name in future.
@since 0.6.8
@param o The option set to work on
@param len 0 = disable this feature and perform name translation
according to other settings.
>0 = Omit any translation. Eventually abort image production
if a name is longer than the given value.
-1 = Like >0. Allow maximum possible length.
isoburn_igopt_get_untranslated_name_len() will tell the
effectively resulting value.
@return >0 success, <=0 failure
*/
int isoburn_igopt_set_untranslated_name_len(struct isoburn_imgen_opts *o,
int len);
int isoburn_igopt_get_untranslated_name_len(struct isoburn_imgen_opts *o,
int *len);
/** Whether and how files should be sorted.
@since 0.1.0
@param o The option set to work on
@ -1165,7 +1194,7 @@ int isoburn_igopt_get_over_ugid(struct isoburn_imgen_opts *o,
int *replace_uid, int *replace_gid,
uid_t *uid, gid_t *gid);
/** Set the charcter set to use for representing filenames in the image.
/** Set the charcter set to use for representing RR filenames in the image.
@since 0.1.0
@param o The option set to work on
@param output_charset Set this to NULL to use the default output charset.

@ -40,6 +40,7 @@ isoburn_igopt_get_scdbackup_tag;
isoburn_igopt_get_sort_files;
isoburn_igopt_get_system_area;
isoburn_igopt_get_tail_blocks;
isoburn_igopt_get_untranslated_name_len;
isoburn_igopt_new;
isoburn_igopt_set_disc_label;
isoburn_igopt_set_extensions;
@ -55,6 +56,7 @@ isoburn_igopt_set_scdbackup_tag;
isoburn_igopt_set_sort_files;
isoburn_igopt_set_system_area;
isoburn_igopt_set_tail_blocks;
isoburn_igopt_set_untranslated_name_len;
isoburn_initialize;
isoburn_is_compatible;
isoburn_libburn_req;

@ -1 +1 @@
#define Xorriso_timestamP "2010.12.13.123226"
#define Xorriso_timestamP "2010.12.22.133742"

Loading…
Cancel
Save