New command -ecma119_map

This commit is contained in:
Thomas Schmitt 2015-08-17 20:08:42 +00:00
parent 8fa127f474
commit f13b6c7a4c
12 changed files with 171 additions and 59 deletions

View File

@ -199,6 +199,7 @@ Xorriso_option_drive_class;
Xorriso_option_dummy;
Xorriso_option_dvd_obs;
Xorriso_option_early_drive_test;
Xorriso_option_ecma119_map;
Xorriso_option_eject;
Xorriso_option_end;
Xorriso_option_errfile_log;
@ -238,6 +239,7 @@ Xorriso_option_map_l;
Xorriso_option_mark;
Xorriso_option_md5;
Xorriso_option_mkdiri;
Xorriso_option_modesty_on_drive;
Xorriso_option_mount;
Xorriso_option_mount_opts;
Xorriso_option_move;

View File

@ -143,6 +143,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->do_fat= 0;
m->do_rockridge= 1;
m->do_iso1999= 0;
m->ecma119_map= 1;
m->do_aaip= 0;
m->do_md5= 0;
m->no_emul_toc= 0;

View File

@ -498,6 +498,24 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
ext|= isoburn_ropt_nomd5;
if(xorriso->do_md5 & 32)
ext|= isoburn_ropt_nomd5tag;
if(xorriso->ecma119_map == 0)
ext|= isoburn_ropt_map_unmapped;
else if(xorriso->ecma119_map == 2)
ext|= isoburn_ropt_map_uppercase;
else if(xorriso->ecma119_map == 3)
ext|= isoburn_ropt_map_lowercase;
else
ext|= isoburn_ropt_map_stripped;
/* >>> Next rev: more bits in do_*, #de fine Xorriso_provisory_read_optS 1 */
#ifdef Xorriso_provisory_read_optS
if(!xorriso->do_rockridge)
ext|= isoburn_ropt_norock;
if(!xorriso->do_joliet)
ext|= isoburn_ropt_nojoliet;
#endif /* Xorriso_provisory_read_optS */
isoburn_ropt_set_extensions(ropts, ext);

View File

@ -346,6 +346,26 @@ int Xorriso_option_early_stdio_test(struct XorrisO *xorriso, char *mode,
}
/* Command -ecma119_map */
int Xorriso_option_ecma119_map(struct XorrisO *xorriso, char *mode, int flag)
{
if(strcmp(mode, "unmapped") == 0)
xorriso->ecma119_map= 0;
else if(strcmp(mode, "stripped") == 0)
xorriso->ecma119_map= 1;
else if(strcmp(mode, "uppercase") == 0)
xorriso->ecma119_map= 2;
else if(strcmp(mode, "lowercase") == 0)
xorriso->ecma119_map= 3;
else {
sprintf(xorriso->info_text, "-ecma119_map: unknown mode '%s'", mode);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
return(0);
}
return(1);
}
/* Option -eject */
/* @param flag bit0=do not report toc of eventually remaining drives
*/
@ -1635,7 +1655,7 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" Set the read speed. Default is \"none\" = do not set speed",
" before reading.",
" -load \"session\"|\"track\"|\"lba\"|\"sbsector\"|\"volid\"|\"auto\" id",
" Load a particular (outdated) ISO image from a -dev or",
" Load a particular (outdated) ISO session from a -dev or",
" -indev which hosts more than one session.",
" -displacement [-]block_address",
" When loading ISO tree or reading data files compensate a",
@ -1668,13 +1688,16 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" Enable or disable reading and writing of ACLs.",
" -xattr \"on\"|\"off\"",
" Enable or disable reading and writing of xattr.",
" -md5 \"on\"|\"all\"|\"off\"",
" Enable or disable processing of MD5 checksums.",
" -for_backup",
" Shortcut for: -hardlinks on -acl on -xattr on -md5 on",
" -ecma119_map \"unmapped\"|\"stripped\"|\"uppercase\"|\"lowercase\"",
" Choose conversion of file names if neither Rock Ridge",
" nor Joliet is present in the loaded ISO session.",
" -disk_dev_ino \"on\"|\"ino_only\"|\"off\"",
" Enable or disable recording of disk file dev_t and ino_t",
" and their use in file comparison.",
" -md5 \"on\"|\"all\"|\"off\"",
" Enable or disable processing of MD5 checksums.",
" -scdbackup_tag list_path record_name",
" Enable production of scdbackup tag with -md5 on",
" -ban_stdio_write",

View File

@ -522,7 +522,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
"close","close_damaged",
"commit_eject","compliance","copyright_file",
"dev","dialog","disk_dev_ino","disk_pattern","displacement",
"dummy","dvd_obs","early_stdio_test", "eject",
"dummy","dvd_obs","early_stdio_test","ecma119_map","eject",
"iso_rr_pattern","follow","format","fs","gid","grow_blindly","hardlinks",
"hfsplus","history","indev","in_charset","joliet",
"list_delimiter","list_extras","list_profiles","local_charset",
@ -670,6 +670,7 @@ int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso,
"read_speed", "load", "displacement",
"drive_class", "assert_volid", "in_charset",
"auto_charset", "hardlinks", "acl", "xattr", "md5", "for_backup",
"ecma119_map",
"disk_dev_ino", "rom_toc_scan", "calm_drive", "ban_stdio_write",
"early_stdio_test", "data_cache_size",
@ -1252,6 +1253,10 @@ next_command:;
(*idx)++;
ret= Xorriso_option_early_stdio_test(xorriso, arg1, 0);
} else if(strcmp(cmd,"ecma119_map")==0) {
(*idx)++;
ret= Xorriso_option_ecma119_map(xorriso, arg1, 0);
} else if(strcmp(cmd,"eject")==0) {
(*idx)++;
ret= Xorriso_option_eject(xorriso, arg1, 0);

View File

@ -3596,6 +3596,19 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->ecma119_map == 1);
sprintf(line, "-ecma119_map ");
if(xorriso->ecma119_map == 0)
strcat(line, "unmapped\n");
else if(xorriso->ecma119_map == 2)
strcat(line, "uppercase\n");
else if(xorriso->ecma119_map == 3)
strcat(line, "lowercase\n");
else
strcat(line, "stripped\n");
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->scdbackup_tag_name[0] == 0 &&
xorriso->scdbackup_tag_listname[0] == 0);
sprintf(line, "-scdbackup_tag ");

View File

@ -934,6 +934,21 @@ Enable all extra features which help to produce or to restore backups with
highest fidelity of file properties.
Currently this is a shortcut for: \-hardlinks on \-acl on \-xattr on \-md5 on.
.TP
\fB\-ecma119_map\fR "stripped"|"unmapped"|"lowercase"|"uppercase"
Choose the conversion of file names from the loaded session if neither
a Rock Ridge name nor a Joliet name was read from the session.
.br
Mode "stripped" is the default. It shows the names as found in the ISO but
removes trailing ";1" or ".;1" if present.
.br
Mode "unmapped" shows names as found without removing characters.
.br
Mode "lowercase" is like "stripped" but also maps uppercase letters to
lowercase letters. This is compatible to default GNU/Linux mount behavior.
.br
Mode "uppercase" is like "stripped" but maps lowercase letters to uppercase,
if any occur despite the prescriptions of ECMA\-119.
.TP
\fB\-disk_dev_ino\fR "on"|"ino_only"|"off"
Enable or disable processing of recorded file identification numbers
(dev_t and ino_t). If enabled they are stored as xattr and allow

View File

@ -1465,6 +1465,9 @@ int Xorriso_option_dvd_obs(struct XorrisO *xorriso, char *obs, int flag);
int Xorriso_option_early_stdio_test(struct XorrisO *xorriso, char *mode,
int flag);
/* Command -ecma119_map */
int Xorriso_option_ecma119_map(struct XorrisO *xorriso, char *mode, int flag);
/* Command -eject */
/* @param flag bit0=do not report toc of eventually remaining drives
*/

View File

@ -845,6 +845,18 @@ activate them only after image loading.
Enable all extra features which help to produce or to restore
backups with highest fidelity of file properties. Currently this
is a shortcut for: -hardlinks on -acl on -xattr on -md5 on.
-ecma119_map "stripped"|"unmapped"|"lowercase"|"uppercase"
Choose the conversion of file names from the loaded session if
neither a Rock Ridge name nor a Joliet name was read from the
session.
Mode "stripped" is the default. It shows the names as found in the
ISO but removes trailing ";1" or ".;1" if present.
Mode "unmapped" shows names as found without removing characters.
Mode "lowercase" is like "stripped" but also maps uppercase letters
to lowercase letters. This is compatible to default GNU/Linux
mount behavior.
Mode "uppercase" is like "stripped" but maps lowercase letters to
uppercase, if any occur despite the prescriptions of ECMA-119.
-disk_dev_ino "on"|"ino_only"|"off"
Enable or disable processing of recorded file identification
numbers (dev_t and ino_t). If enabled they are stored as xattr and
@ -4966,11 +4978,11 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -assert_volid rejects undesired images: Loading. (line 102)
* -auto_charset learns character set from image: Loading. (line 114)
* -backslash_codes enables backslash conversion: Scripting. (line 71)
* -ban_stdio_write demands real drive: Loading. (line 263)
* -ban_stdio_write demands real drive: Loading. (line 275)
* -biblio_file sets biblio file name: SetWrite. (line 234)
* -blank erases media: Writing. (line 57)
* -boot_image controls bootability: Bootable. (line 65)
* -calm_drive reduces drive activity: Loading. (line 253)
* -calm_drive reduces drive activity: Loading. (line 265)
* -cd sets working directory in ISO: Navigate. (line 7)
* -cdx sets working directory on disk: Navigate. (line 15)
* -changes_pending overrides change status: Writing. (line 12)
@ -5004,12 +5016,12 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -cp_rx copies file trees to disk: Restore. (line 104)
* -cp_rx copies file trees to disk <1>: Restore. (line 112)
* -cut_out inserts piece of data file: Insert. (line 118)
* -data_cache_size adjusts read cache size: Loading. (line 279)
* -data_cache_size adjusts read cache size: Loading. (line 291)
* -dev acquires one drive for input and output: AqDrive. (line 12)
* -devices gets list of drives: Inquiry. (line 7)
* -device_links gets list of drives: Inquiry. (line 17)
* -dialog enables dialog mode: DialogCtl. (line 7)
* -disk_dev_ino fast incremental backup: Loading. (line 205)
* -disk_dev_ino fast incremental backup: Loading. (line 217)
* -disk_pattern controls pattern expansion: Insert. (line 34)
* -displacement compensate altered image start address: Loading.
(line 57)
@ -5020,7 +5032,8 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -dusx show directory size on disk: Navigate. (line 85)
* -dux show directory size on disk: Navigate. (line 81)
* -dvd_obs set write block size: SetWrite. (line 314)
* -early_stdio_test classifies stdio drives: Loading. (line 267)
* -early_stdio_test classifies stdio drives: Loading. (line 279)
* -ecma119_map names w/o Rock Ridge, Joliet: Loading. (line 205)
* -eject ejects drive tray: Writing. (line 50)
* -end writes pending session and ends program: Scripting. (line 151)
* -errfile_log logs problematic disk files: Scripting. (line 116)
@ -5134,7 +5147,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
(line 51)
* -rollback discards pending changes: Writing. (line 9)
* -rollback_end ends program without writing: Scripting. (line 154)
* -rom_toc_scan searches for sessions: Loading. (line 225)
* -rom_toc_scan searches for sessions: Loading. (line 237)
* -rr_reloc_dir sets name of relocation directory: SetWrite. (line 144)
* -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 179)
* -scsi_log reports SCSI commands: Scripting. (line 143)
@ -5203,7 +5216,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Appended partition, in MBR or GPT: Bootable. (line 224)
* Automatic execution order, of arguments, -x: ArgSort. (line 16)
* Backslash Interpretation, _definition: Processing. (line 53)
* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 205)
* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 217)
* Backup, enable features, -for_backup: Loading. (line 201)
* Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 179)
* Blank media, _definition: Media. (line 29)
@ -5241,8 +5254,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Directory, delete, -rmdir: Manip. (line 29)
* disk_path, _definition: Insert. (line 6)
* Drive, accessability, -drive_class: Loading. (line 73)
* Drive, classify stdio, -early_stdio_test: Loading. (line 267)
* Drive, demand real MMC, -ban_stdio_write: Loading. (line 263)
* Drive, classify stdio, -early_stdio_test: Loading. (line 279)
* Drive, demand real MMC, -ban_stdio_write: Loading. (line 275)
* Drive, eject tray, -eject: Writing. (line 50)
* Drive, for input and output, -dev: AqDrive. (line 12)
* Drive, for input, -indev: AqDrive. (line 23)
@ -5250,7 +5263,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Drive, get drive list, -devices: Inquiry. (line 7)
* Drive, get drive list, -device_links: Inquiry. (line 17)
* Drive, list supported media, -list_profiles: Writing. (line 177)
* Drive, reduce activity, -calm_drive: Loading. (line 253)
* Drive, reduce activity, -calm_drive: Loading. (line 265)
* Drive, report SCSI commands, -scsi_log: Scripting. (line 143)
* Drive, write and eject, -commit_eject: Writing. (line 53)
* Drive, _definition: Drives. (line 6)
@ -5266,6 +5279,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Examples: Examples. (line 6)
* extattr, _definition: Extras. (line 66)
* File content, copy, -concat: Restore. (line 119)
* File names, if neither Rock Ridge nor Joliet: Loading. (line 205)
* Filter, apply to file tree, -set_filter_r: Filter. (line 84)
* Filter, apply to file, -set_filter: Filter. (line 58)
* Filter, ban registration, -close_filter_list: Filter. (line 50)
@ -5287,7 +5301,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* HFS+ serial number: Bootable. (line 330)
* hidden, set in ISO image, -hide: Manip. (line 171)
* HP-PA boot sector, production: Bootable. (line 305)
* Image reading, cache size, -data_cache_size: Loading. (line 279)
* Image reading, cache size, -data_cache_size: Loading. (line 291)
* Image, demand volume ID, -assert_volid: Loading. (line 102)
* Image, discard pending changes, -rollback: Writing. (line 9)
* Image, override change status, -changes_pending: Writing. (line 12)
@ -5444,7 +5458,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* SUN SPARC boot images, activation: Bootable. (line 368)
* Symbolic link, create, -lns: Insert. (line 160)
* System area, _definition: Bootable. (line 175)
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 225)
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 237)
* Table-of-content, show, -toc: Inquiry. (line 27)
* Timestamps, set in ISO image, -alter_date: Manip. (line 136)
* Timestamps, set in ISO image, -alter_date_r: Manip. (line 168)
@ -5502,47 +5516,47 @@ Node: Commands24941
Node: ArgSort26618
Node: AqDrive28112
Node: Loading31167
Node: Insert48136
Node: SetInsert58361
Node: Manip67209
Node: CmdFind76992
Node: Filter94752
Node: Writing99375
Node: SetWrite109530
Node: Bootable132115
Node: Jigdo154049
Node: Charset158308
Node: Exception161635
Node: DialogCtl167764
Node: Inquiry170366
Node: Navigate178811
Node: Verify187106
Node: Restore196968
Node: Emulation205589
Node: Scripting215999
Node: Frontend223780
Node: Examples233415
Node: ExDevices234593
Node: ExCreate235254
Node: ExDialog236554
Node: ExGrowing237825
Node: ExModifying238634
Node: ExBootable239144
Node: ExCharset239699
Node: ExPseudo240595
Node: ExCdrecord241518
Node: ExMkisofs241838
Node: ExGrowisofs243195
Node: ExException244349
Node: ExTime244807
Node: ExIncBackup245265
Node: ExRestore249291
Node: ExRecovery250237
Node: Files250809
Node: Seealso252126
Node: Bugreport252841
Node: Legal253432
Node: CommandIdx254444
Node: ConceptIdx271267
Node: Insert48845
Node: SetInsert59070
Node: Manip67918
Node: CmdFind77701
Node: Filter95461
Node: Writing100084
Node: SetWrite110239
Node: Bootable132824
Node: Jigdo154758
Node: Charset159017
Node: Exception162344
Node: DialogCtl168473
Node: Inquiry171075
Node: Navigate179520
Node: Verify187815
Node: Restore197677
Node: Emulation206298
Node: Scripting216708
Node: Frontend224489
Node: Examples234124
Node: ExDevices235302
Node: ExCreate235963
Node: ExDialog237263
Node: ExGrowing238534
Node: ExModifying239343
Node: ExBootable239853
Node: ExCharset240408
Node: ExPseudo241304
Node: ExCdrecord242227
Node: ExMkisofs242547
Node: ExGrowisofs243904
Node: ExException245058
Node: ExTime245516
Node: ExIncBackup245974
Node: ExRestore250000
Node: ExRecovery250946
Node: Files251518
Node: Seealso252835
Node: Bugreport253550
Node: Legal254141
Node: CommandIdx255153
Node: ConceptIdx272049

End Tag Table

View File

@ -1177,6 +1177,23 @@ Enable all extra features which help to produce or to restore backups with
highest fidelity of file properties.
Currently this is a shortcut for: -hardlinks on -acl on -xattr on -md5 on.
@c man .TP
@item -ecma119_map "stripped"|"unmapped"|"lowercase"|"uppercase"
@kindex -ecma119_map names w/o Rock Ridge, Joliet
@cindex File names, if neither Rock Ridge nor Joliet
Choose the conversion of file names from the loaded session if neither
a Rock Ridge name nor a Joliet name was read from the session.
@*
Mode "stripped" is the default. It shows the names as found in the ISO but
removes trailing ";1" or ".;1" if present.
@*
Mode "unmapped" shows names as found without removing characters.
@*
Mode "lowercase" is like "stripped" but also maps uppercase letters to
lowercase letters. This is compatible to default GNU/Linux mount behavior.
@*
Mode "uppercase" is like "stripped" but maps lowercase letters to uppercase,
if any occur despite the prescriptions of ECMA-119.
@c man .TP
@item -disk_dev_ino "on"|"ino_only"|"off"
@kindex -disk_dev_ino fast incremental backup
@cindex Backup, enable fast incremental, -disk_dev_ino

View File

@ -146,6 +146,7 @@ struct XorrisO { /* the global context of xorriso */
int do_fat;
int do_rockridge;
int do_iso1999;
int ecma119_map; /* 0=unmapped , 1=stripped , 2=uppercase , 3=lowercase */
int do_aaip; /* bit0= ACL in
bit1= ACL out

View File

@ -1 +1 @@
#define Xorriso_timestamP "2015.08.17.200155"
#define Xorriso_timestamP "2015.08.17.200910"