New command -read_fs
This commit is contained in:
parent
9c303135f6
commit
2e535ade2a
@ -274,6 +274,7 @@ Xorriso_option_publisher;
|
||||
Xorriso_option_pvd_info;
|
||||
Xorriso_option_pwdi;
|
||||
Xorriso_option_pwdx;
|
||||
Xorriso_option_read_fs;
|
||||
Xorriso_option_read_mkisofsrc;
|
||||
Xorriso_option_reassure;
|
||||
Xorriso_option_report_about;
|
||||
|
@ -205,6 +205,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
|
||||
m->image_start_value[0]= 0;
|
||||
m->displacement= 0;
|
||||
m->displacement_sign= 0;
|
||||
m->read_fs= 0;
|
||||
m->drives_exclusive= 1;
|
||||
m->early_stdio_test= 0;
|
||||
m->cache_num_tiles= 0;
|
||||
|
@ -492,6 +492,10 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
|
||||
goto ex;
|
||||
|
||||
ext= isoburn_ropt_noiso1999;
|
||||
if(xorriso->read_fs & 1)
|
||||
ext|= isoburn_ropt_norock;
|
||||
if(xorriso->read_fs & 2)
|
||||
ext|= isoburn_ropt_nojoliet;
|
||||
if((xorriso->ino_behavior & (1 | 2)) && !(xorriso->do_aaip & (1 | 4 | 32))
|
||||
&& !(xorriso->do_md5 & 1) && !(xorriso->do_hfsplus))
|
||||
ext|= isoburn_ropt_noaaip;
|
||||
@ -514,16 +518,6 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
|
||||
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);
|
||||
|
||||
isoburn_ropt_set_default_perms(ropts, (uid_t) 0, (gid_t) 0, (mode_t) 0555);
|
||||
|
@ -1703,6 +1703,8 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
||||
" When loading ISO tree or reading data files compensate a",
|
||||
" displacement versus the start address for which the image",
|
||||
" was prepared.",
|
||||
" -read_fs \"any\"|\"norock\"|\"nojoliet\"|\"ecma119\"",
|
||||
" Specify which kind of filesystem tree to load if present.",
|
||||
" -rom_toc_scan \"on\"|\"force\"|\"off\"[:\"emul_on\"|\"emul_off\"]",
|
||||
" [:\"emul_wide\"|\"emul_narrow\"]",
|
||||
" Enable scanning for ISO sessions on read-only drives/media",
|
||||
|
@ -439,6 +439,26 @@ int Xorriso_option_pwdx(struct XorrisO *xorriso, int flag)
|
||||
}
|
||||
|
||||
|
||||
/* Command -read_fs */
|
||||
int Xorriso_option_read_fs(struct XorrisO *xorriso, char *mode, int flag)
|
||||
{
|
||||
if(strcmp(mode, "any") == 0) {
|
||||
xorriso->read_fs= 0;
|
||||
} else if(strcmp(mode, "norock") == 0) {
|
||||
xorriso->read_fs= 1;
|
||||
} else if(strcmp(mode, "nojoliet") == 0) {
|
||||
xorriso->read_fs= 2;
|
||||
} else if(strcmp(mode, "ecma119") == 0) {
|
||||
xorriso->read_fs= 3;
|
||||
} else {
|
||||
sprintf(xorriso->info_text, "-read_fs: unknown mode '%s'", mode);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
return(0);
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int Xorriso_option_read_mkisofsrc(struct XorrisO *xorriso, int flag)
|
||||
{
|
||||
int ret;
|
||||
|
@ -533,7 +533,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
|
||||
"pacifier","padding","path_list","pathspecs","pkt_output",
|
||||
"preparer_id","print","print_info","print_mark","prompt",
|
||||
"prog","prog_help","publisher","quoted_not_list","quoted_path_list",
|
||||
"read_speed","reassure","report_about",
|
||||
"read_fs","read_speed","reassure","report_about",
|
||||
"report_el_torito","report_system_area","rockridge",
|
||||
"rom_toc_scan","rr_reloc_dir","scsi_log",
|
||||
"session_log","sh_style_result","signal_handling","sleep",
|
||||
@ -668,7 +668,7 @@ int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso,
|
||||
"mount_opts", "mount_cmd", "session_string",
|
||||
|
||||
"* Influencing the behavior of image loading:",
|
||||
"read_speed", "load", "displacement",
|
||||
"read_speed", "load", "displacement", "read_fs",
|
||||
"drive_class", "assert_volid", "in_charset",
|
||||
"auto_charset", "hardlinks", "acl", "xattr", "md5", "for_backup",
|
||||
"ecma119_map",
|
||||
@ -1646,6 +1646,10 @@ next_command:;
|
||||
(*idx)++;
|
||||
ret= Xorriso_option_path_list(xorriso, arg1, 1);
|
||||
|
||||
} else if(strcmp(cmd,"read_fs")==0) {
|
||||
(*idx)++;
|
||||
ret= Xorriso_option_read_fs(xorriso, arg1, 0);
|
||||
|
||||
} else if(strcmp(cmd,"read_mkisofsrc")==0) {
|
||||
ret= Xorriso_option_read_mkisofsrc(xorriso, 0);
|
||||
|
||||
|
@ -3505,6 +3505,14 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
}
|
||||
|
||||
is_default= (xorriso->read_fs == 0);
|
||||
sprintf(line, "-read_fs %s\n",
|
||||
xorriso->read_fs == 0 ? "any" :
|
||||
xorriso->read_fs == 1 ? "norock" :
|
||||
xorriso->read_fs == 2 ? "nojoliet" : "ecma119");
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
||||
|
||||
is_default= (xorriso->do_calm_drive & 1);
|
||||
sprintf(line,"-calm_drive %s\n", xorriso->do_calm_drive & 1 ? "on" : "off");
|
||||
if(!(is_default && no_defaults))
|
||||
|
@ -9,7 +9,7 @@
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH XORRISO 1 "Version 1.4.1, Sep 20, 2015"
|
||||
.TH XORRISO 1 "Version 1.4.1, Sep 22, 2015"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
@ -814,6 +814,19 @@ Note: This is not a security feature but rather a bumper for the superuser to
|
||||
prevent inadverted mishaps. For reliably blocking access to a device file you
|
||||
have to deny its rw\-permissions in the filesystem.
|
||||
.TP
|
||||
\fB\-read_fs\fR "any"|"norock"|"nojoliet"|"ecma119"
|
||||
Specify which kind of filesystem tree to load if present. If the wish cannot
|
||||
be fulfilled, then ECMA\-119 names are loaded and converted according
|
||||
to \-ecma119_map.
|
||||
.br
|
||||
"any" first tries to read Rock Ridge. If not present, Joliet is tried.
|
||||
.br
|
||||
"norock" does not try Rock Ridge.
|
||||
.br
|
||||
"nojoliet" does not try Joliet.
|
||||
.br
|
||||
"ecma119" tries neither Rock Ridge nor Joliet.
|
||||
.TP
|
||||
\fB\-assert_volid\fR pattern severity
|
||||
Refuse to load ISO images with volume IDs which do not match the given
|
||||
search pattern. When refusing an image, give up the input drive and issue
|
||||
@ -3367,7 +3380,7 @@ It will overwrite the first 512 bytes of any data provided by system_area=.
|
||||
Only a single boot file can be declared by mipsel_path=.
|
||||
.br
|
||||
\fBsparc_label=\fRtext causes the production of a SUN Disk Label with the
|
||||
given text as ASCII label. Partitions 2 to 8 may occupied by appended images.
|
||||
given text as ASCII label. Partitions 2 to 8 may be occupied by appended images.
|
||||
Partition 1 will always be the ISO image. See command \-append_partition.
|
||||
The first 512 bytes of any data provided by system_area= will be overwritten.
|
||||
.br
|
||||
|
@ -1800,6 +1800,10 @@ int Xorriso_option_pwdi(struct XorrisO *xorriso, int flag);
|
||||
/* Command -pwdx */
|
||||
int Xorriso_option_pwdx(struct XorrisO *xorriso, int flag);
|
||||
|
||||
/* Command -read_fs */
|
||||
/* @since 1.4.2 */
|
||||
int Xorriso_option_read_fs(struct XorrisO *xorriso, char *mode, int flag);
|
||||
|
||||
/* Command -read_mkisofsrc */
|
||||
/* @since 0.6.0 */
|
||||
int Xorriso_option_read_mkisofsrc(struct XorrisO *xorriso, int flag);
|
||||
|
@ -742,6 +742,15 @@ activate them only after image loading.
|
||||
superuser to prevent inadverted mishaps. For reliably blocking
|
||||
access to a device file you have to deny its rw-permissions in the
|
||||
filesystem.
|
||||
-read_fs "any"|"norock"|"nojoliet"|"ecma119"
|
||||
Specify which kind of filesystem tree to load if present. If the
|
||||
wish cannot be fulfilled, then ECMA-119 names are loaded and
|
||||
converted according to -ecma119_map.
|
||||
"any" first tries to read Rock Ridge. If not present, Joliet is
|
||||
tried.
|
||||
"norock" does not try Rock Ridge.
|
||||
"nojoliet" does not try Joliet.
|
||||
"ecma119" tries neither Rock Ridge nor Joliet.
|
||||
-assert_volid pattern severity
|
||||
Refuse to load ISO images with volume IDs which do not match the
|
||||
given search pattern. When refusing an image, give up the input
|
||||
@ -2836,8 +2845,8 @@ Examples:
|
||||
data provided by system_area=. Only a single boot file can be
|
||||
declared by mipsel_path=.
|
||||
*sparc_label=*text causes the production of a SUN Disk Label with
|
||||
the given text as ASCII label. Partitions 2 to 8 may occupied by
|
||||
appended images. Partition 1 will always be the ISO image. See
|
||||
the given text as ASCII label. Partitions 2 to 8 may be occupied
|
||||
by appended images. Partition 1 will always be the ISO image. See
|
||||
command -append_partition. The first 512 bytes of any data
|
||||
provided by system_area= will be overwritten.
|
||||
*grub2_sparc_core=*iso_rr_path causes the content address and size
|
||||
@ -5004,7 +5013,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
||||
* # starts a comment line: Scripting. (line 156)
|
||||
* -abort_on controls abort on error: Exception. (line 27)
|
||||
* -abstract_file sets abstract file name: SetWrite. (line 228)
|
||||
* -acl controls handling of ACLs: Loading. (line 162)
|
||||
* -acl controls handling of ACLs: Loading. (line 171)
|
||||
* -add inserts one or more paths: Insert. (line 44)
|
||||
* -add_plainly inserts one or more paths: Insert. (line 62)
|
||||
* -alter_date sets timestamps in ISO image: Manip. (line 136)
|
||||
@ -5014,14 +5023,14 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
||||
* -application_id sets application id: SetWrite. (line 191)
|
||||
* -application_use sets application use field: SetWrite. (line 250)
|
||||
* -as emulates mkisofs or cdrecord: Emulation. (line 13)
|
||||
* -assert_volid rejects undesired images: Loading. (line 102)
|
||||
* -auto_charset learns character set from image: Loading. (line 114)
|
||||
* -assert_volid rejects undesired images: Loading. (line 111)
|
||||
* -auto_charset learns character set from image: Loading. (line 123)
|
||||
* -backslash_codes enables backslash conversion: Scripting. (line 71)
|
||||
* -ban_stdio_write demands real drive: Loading. (line 296)
|
||||
* -ban_stdio_write demands real drive: Loading. (line 305)
|
||||
* -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 286)
|
||||
* -calm_drive reduces drive activity: Loading. (line 295)
|
||||
* -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)
|
||||
@ -5055,12 +5064,12 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
||||
* -cp_rx copies file trees to disk: Restore. (line 103)
|
||||
* -cp_rx copies file trees to disk <1>: Restore. (line 111)
|
||||
* -cut_out inserts piece of data file: Insert. (line 118)
|
||||
* -data_cache_size adjusts read cache size: Loading. (line 312)
|
||||
* -data_cache_size adjusts read cache size: Loading. (line 321)
|
||||
* -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 217)
|
||||
* -disk_dev_ino fast incremental backup: Loading. (line 226)
|
||||
* -disk_pattern controls pattern expansion: Insert. (line 34)
|
||||
* -displacement compensate altered image start address: Loading.
|
||||
(line 57)
|
||||
@ -5071,8 +5080,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 300)
|
||||
* -ecma119_map names w/o Rock Ridge, Joliet: Loading. (line 205)
|
||||
* -early_stdio_test classifies stdio drives: Loading. (line 309)
|
||||
* -ecma119_map names w/o Rock Ridge, Joliet: Loading. (line 214)
|
||||
* -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)
|
||||
@ -5083,13 +5092,13 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
||||
* -extract_cut copies file piece to disk: Restore. (line 80)
|
||||
* -extract_l copies files to disk: Restore. (line 76)
|
||||
* -extract_single copies file to disk: Restore. (line 73)
|
||||
* -file_name_limit curbs length of file names: Loading. (line 237)
|
||||
* -file_name_limit curbs length of file names: Loading. (line 246)
|
||||
* -file_size_limit limits data file size: SetInsert. (line 7)
|
||||
* -find traverses and alters ISO tree: CmdFind. (line 7)
|
||||
* -findx traverses disk tree: Navigate. (line 88)
|
||||
* -follow softlinks and mount points: SetInsert. (line 69)
|
||||
* -format formats media: Writing. (line 87)
|
||||
* -for_backup -acl,-xattr,-hardlinks,-md5: Loading. (line 201)
|
||||
* -for_backup -acl,-xattr,-hardlinks,-md5: Loading. (line 210)
|
||||
* -fs sets size of fifo: SetWrite. (line 366)
|
||||
* -getfacl shows ACL in ISO image: Navigate. (line 60)
|
||||
* -getfacl_r shows ACL in ISO image: Navigate. (line 66)
|
||||
@ -5097,13 +5106,13 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
||||
* -getfattr_r shows xattr in ISO image: Navigate. (line 72)
|
||||
* -gid sets global ownership: SetWrite. (line 271)
|
||||
* -grow_blindly overides next writeable address: AqDrive. (line 43)
|
||||
* -hardlinks controls handling of hard links: Loading. (line 125)
|
||||
* -hardlinks controls handling of hard links: Loading. (line 134)
|
||||
* -help prints help text: Scripting. (line 19)
|
||||
* -hfsplus enables production of HFS+ partition: SetWrite. (line 14)
|
||||
* -hide excludes file names from directory trees: Manip. (line 171)
|
||||
* -history brings text into readline history: Scripting. (line 42)
|
||||
* -indev acquires a drive for input: AqDrive. (line 23)
|
||||
* -in_charset sets input character set: Loading. (line 109)
|
||||
* -in_charset sets input character set: Loading. (line 118)
|
||||
* -iso_rr_pattern controls pattern expansion: Manip. (line 10)
|
||||
* -jigdo clears JTE or or adds parameter to JTE: Jigdo. (line 33)
|
||||
* -joliet enables production of Joliet tree: SetWrite. (line 10)
|
||||
@ -5131,7 +5140,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
||||
* -map_l inserts paths from disk file: Insert. (line 90)
|
||||
* -map_single inserts path: Insert. (line 87)
|
||||
* -mark sets synchronizing message: Frontend. (line 23)
|
||||
* -md5 controls handling of MD5 sums: Loading. (line 173)
|
||||
* -md5 controls handling of MD5 sums: Loading. (line 182)
|
||||
* -mkdir creates ISO directory: Insert. (line 156)
|
||||
* -modesty_on_drive keep drive buffer hungry: SetWrite. (line 320)
|
||||
* -mount issues mount command for ISO session: Restore. (line 146)
|
||||
@ -5172,6 +5181,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
||||
* -pwdx tells working directory on disk: Navigate. (line 21)
|
||||
* -quoted_not_list sets exclusions: SetInsert. (line 66)
|
||||
* -quoted_path_list inserts paths from disk file: Insert. (line 79)
|
||||
* -read_fs filesystem type for image loading: Loading. (line 102)
|
||||
* -read_mkisofsrc searches and reads .mkisofsrc file: Emulation.
|
||||
(line 155)
|
||||
* -read_speed set read speed: Loading. (line 11)
|
||||
@ -5187,7 +5197,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 258)
|
||||
* -rom_toc_scan searches for sessions: Loading. (line 267)
|
||||
* -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)
|
||||
@ -5230,7 +5240,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
||||
* -volume_date sets volume timestamp: SetWrite. (line 205)
|
||||
* -write_type chooses TAO or SAO/DAO: SetWrite. (line 387)
|
||||
* -x enables automatic execution order of arguments: ArgSort. (line 16)
|
||||
* -xattr controls handling of xattr (EA): Loading. (line 169)
|
||||
* -xattr controls handling of xattr (EA): Loading. (line 178)
|
||||
* -zisofs controls zisofs production: SetWrite. (line 274)
|
||||
|
||||
|
||||
@ -5242,7 +5252,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
|
||||
|