New command -report_el_torito (former -report_system_area "el_torito")

This commit is contained in:
Thomas Schmitt 2014-04-29 17:49:08 +00:00
parent 3dfd764d74
commit a4a13cbe2c
10 changed files with 118 additions and 93 deletions

View File

@ -267,7 +267,8 @@ Xorriso_option_pwdx;
Xorriso_option_read_mkisofsrc; Xorriso_option_read_mkisofsrc;
Xorriso_option_reassure; Xorriso_option_reassure;
Xorriso_option_report_about; Xorriso_option_report_about;
Xorriso_report_system_area; Xorriso_option_report_el_torito;
Xorriso_option_report_system_area;
Xorriso_option_return_with; Xorriso_option_return_with;
Xorriso_option_rmi; Xorriso_option_rmi;
Xorriso_option_rockridge; Xorriso_option_rockridge;

View File

@ -1370,36 +1370,26 @@ static void Xorriso_report_lines(struct XorrisO *xorriso,
*/ */
int Xorriso_report_system_area(struct XorrisO *xorriso, char *form, int flag) int Xorriso_report_system_area(struct XorrisO *xorriso, char *form, int flag)
{ {
int ret, line_count, is_elto= 0; int ret, line_count;
char **lines = NULL; char **lines = NULL;
IsoImage *image; IsoImage *image;
if(strcmp(form, "help") == 0) { if(strcmp(form, "help") == 0) {
if(flag & 1)
ret= iso_image_report_el_torito(NULL, &lines, &line_count, 1);
else
ret= iso_image_report_system_area(NULL, &lines, &line_count, 1); ret= iso_image_report_system_area(NULL, &lines, &line_count, 1);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
sprintf(xorriso->result_line, sprintf(xorriso->result_line,
"------------------------------------------------------------------------------\n"); "------------------------------------------------------------------------------\n");
Xorriso_result(xorriso, 0); Xorriso_result(xorriso, 0);
if(flag & 1)
sprintf(xorriso->result_line, "With -report_el_torito \"plain\":\n");
else
sprintf(xorriso->result_line, "With -report_system_area \"plain\":\n"); sprintf(xorriso->result_line, "With -report_system_area \"plain\":\n");
Xorriso_result(xorriso, 0); Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line, sprintf(xorriso->result_line,
"------------------------------------------------------------------------------\n");
Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line, "\n");
Xorriso_result(xorriso, 0);
Xorriso_report_lines(xorriso, lines, line_count);
iso_image_report_system_area(NULL, &lines, &line_count, 1 << 15);
ret= iso_image_report_el_torito(NULL, &lines, &line_count, 1);
if(ret <= 0)
goto ex;
is_elto= 1;
sprintf(xorriso->result_line,
"------------------------------------------------------------------------------\n");
Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line, "With -report_system_area \"el_torito\":\n");
Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line,
"------------------------------------------------------------------------------\n"); "------------------------------------------------------------------------------\n");
Xorriso_result(xorriso, 0); Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line, "\n"); sprintf(xorriso->result_line, "\n");
@ -1409,22 +1399,19 @@ int Xorriso_report_system_area(struct XorrisO *xorriso, char *form, int flag)
ret= Xorriso_get_volume(xorriso, &image, 0); ret= Xorriso_get_volume(xorriso, &image, 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
if(flag & 1)
ret= iso_image_report_el_torito(image, &lines, &line_count, 0);
else
ret= iso_image_report_system_area(image, &lines, &line_count, 0); ret= iso_image_report_system_area(image, &lines, &line_count, 0);
} else if(strcmp(form, "el_torito") == 0) { } else if(strncmp(form, "gpt_crc_of:", 11) == 0 && !(flag & 1)) {
ret= Xorriso_get_volume(xorriso, &image, 0);
if(ret <= 0)
goto ex;
is_elto= 1;
ret= iso_image_report_el_torito(image, &lines, &line_count, 0);
} else if(strncmp(form, "gpt_crc_of:", 11) == 0) {
ret = Xorriso_gpt_crc(xorriso, form + 11, 0); ret = Xorriso_gpt_crc(xorriso, form + 11, 0);
goto ex; goto ex;
} else { } else {
strcpy(xorriso->info_text, sprintf(xorriso->info_text,
"-report_system_area form parameter not recognized: "); "%s form parameter not recognized: ",
flag & 1 ? "-report_el_torito" : "-report_system_area");
Text_shellsafe(form, xorriso->info_text, 1); Text_shellsafe(form, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex; ret= 0; goto ex;
@ -1432,7 +1419,7 @@ int Xorriso_report_system_area(struct XorrisO *xorriso, char *form, int flag)
if(ret < 0) if(ret < 0)
goto ex; goto ex;
if(lines == NULL || ret == 0) { if(lines == NULL || ret == 0) {
if(is_elto) if(flag & 1)
strcpy(xorriso->info_text, "No El Torito information was loaded"); strcpy(xorriso->info_text, "No El Torito information was loaded");
else else
strcpy(xorriso->info_text, "No System Area was loaded"); strcpy(xorriso->info_text, "No System Area was loaded");
@ -1440,7 +1427,7 @@ int Xorriso_report_system_area(struct XorrisO *xorriso, char *form, int flag)
ret= 2; goto ex; ret= 2; goto ex;
} }
if(line_count == 0) { if(line_count == 0) {
if(is_elto) if(flag & 1)
strcpy(xorriso->info_text, "No El Torito information available"); strcpy(xorriso->info_text, "No El Torito information available");
else else
strcpy(xorriso->info_text, "System Area only contains 0-bytes"); strcpy(xorriso->info_text, "System Area only contains 0-bytes");
@ -1451,7 +1438,7 @@ int Xorriso_report_system_area(struct XorrisO *xorriso, char *form, int flag)
ret= 1; ret= 1;
ex:; ex:;
if(lines != NULL) { if(lines != NULL) {
if(is_elto) if(flag & 1)
iso_image_report_el_torito(NULL, &lines, &line_count, 1 << 15); iso_image_report_el_torito(NULL, &lines, &line_count, 1 << 15);
else else
iso_image_report_system_area(NULL, &lines, &line_count, 1 << 15); iso_image_report_system_area(NULL, &lines, &line_count, 1 << 15);

View File

@ -1785,10 +1785,13 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" Print foreseeable available space on output medium", " Print foreseeable available space on output medium",
" -pvd_info Print various id strings of the loaded ISO image.", " -pvd_info Print various id strings of the loaded ISO image.",
"", "",
" -report_system_area \"plain\"|\"el_torito\"|\"help\"|\"gpt_crc_of:\"disk_path", " -report_el_torito \"plain\"|\"help\"",
" \"plain\" prints information about the El Torito boot catalog",
" and boot images of the loaded ISO image.",
" \"help\" prints an explanation of the output format.",
" -report_system_area \"plain\"|\"help\"|\"gpt_crc_of:\"disk_path",
" \"plain\" prints information about recognized data", " \"plain\" prints information about recognized data",
" in the System Area of the loaded ISO image: MBR, GPT, ...", " in the System Area of the loaded ISO image: MBR, GPT, ...",
" \"el_torito\" prints data from the El Torito boot catalog.",
" \"help\" prints an explanation of the output format.", " \"help\" prints an explanation of the output format.",
" \"gpt_crc_of:\" prints GPT CRC of file disk_path.", " \"gpt_crc_of:\" prints GPT CRC of file disk_path.",
"", "",

View File

@ -491,6 +491,17 @@ int Xorriso_option_report_about(struct XorrisO *xorriso, char *in_severity,
} }
/* Command -report_el_torito */
int Xorriso_option_report_el_torito(struct XorrisO *xorriso,
char *form, int flag)
{
int ret;
ret= Xorriso_report_system_area(xorriso, form, 1);
return(ret);
}
/* Command -report_system_area */ /* Command -report_system_area */
int Xorriso_option_report_system_area(struct XorrisO *xorriso, int Xorriso_option_report_system_area(struct XorrisO *xorriso,
char *form, int flag) char *form, int flag)

View File

@ -531,7 +531,8 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
"pacifier","padding","path_list","pathspecs","pkt_output", "pacifier","padding","path_list","pathspecs","pkt_output",
"preparer_id","print","print_info","print_mark","prompt", "preparer_id","print","print_info","print_mark","prompt",
"prog","prog_help","publisher","quoted_not_list","quoted_path_list", "prog","prog_help","publisher","quoted_not_list","quoted_path_list",
"read_speed","reassure","report_about","report_system_area","rockridge", "read_speed","reassure","report_about",
"report_el_torito","report_system_area","rockridge",
"rom_toc_scan","rr_reloc_dir","scsi_log", "rom_toc_scan","rr_reloc_dir","scsi_log",
"session_log","sh_style_result","signal_handling","sleep", "session_log","sh_style_result","signal_handling","sleep",
"speed","split_size","status","status_history_max", "speed","split_size","status","status_history_max",
@ -679,7 +680,7 @@ int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso,
"* Drive and media related inquiry actions (2):", "* Drive and media related inquiry actions (2):",
"list_profiles", "list_formats", "list_speeds", "list_profiles", "list_formats", "list_speeds",
"toc", "toc_of", "pvd_info", "report_system_area", "toc", "toc_of", "pvd_info", "report_system_area", "report_el_torito",
"* Settings for file insertion:", "* Settings for file insertion:",
"file_size_limit", "not_mgt", "not_paths", "not_leaf", "not_list", "file_size_limit", "not_mgt", "not_paths", "not_leaf", "not_list",
@ -1643,6 +1644,10 @@ next_command:;
(*idx)++; (*idx)++;
ret= Xorriso_option_report_about(xorriso, arg1, 0); ret= Xorriso_option_report_about(xorriso, arg1, 0);
} else if(strcmp(cmd,"report_el_torito")==0) {
(*idx)++;
ret= Xorriso_option_report_el_torito(xorriso, arg1, 0);
} else if(strcmp(cmd,"report_system_area")==0) { } else if(strcmp(cmd,"report_system_area")==0) {
(*idx)++; (*idx)++;
ret= Xorriso_option_report_system_area(xorriso, arg1, 0); ret= Xorriso_option_report_system_area(xorriso, arg1, 0);

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH XORRISO 1 "Version 1.3.7, Apr 23, 2014" .TH XORRISO 1 "Version 1.3.7, Apr 29, 2014"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -3760,17 +3760,21 @@ The timestamps get not automatically propagated from loaded image to newly
written image. The ones for new images may be set by command \-volume_date. written image. The ones for new images may be set by command \-volume_date.
See there for the meaning of the particular timestamps. See there for the meaning of the particular timestamps.
.TP .TP
\fB\-report_system_area\fR "plain"|"el_torito"|"help"|"gpt_crc_of:"disk_path \fB\-report_el_torito\fR "plain"|"help"
.br
With parameter \fBplain\fR print a report about the information found
in the El Torito boot catalog of the loaded ISO image.
.br
With parameter \fBhelp\fR print a text which explains the meaning of the
lines put out by "plain".
.TP
\fB\-report_system_area\fR "plain"|"help"|"gpt_crc_of:"disk_path
With parameter \fBplain\fR print a report about the information found in With parameter \fBplain\fR print a report about the information found in
the System Area of the loaded ISO image. The report consists of zero to the System Area of the loaded ISO image. The report consists of zero to
many lines with a header text, a colon, and information text. many lines with a header text, a colon, and information text.
.br .br
With parameter \fBel_torito\fR print a report about the information found
in the El Torito boot catalog of the loaded ISO image. The boot catalog is
not actually a part of the system area. But its data serve a similar purpose.
.br
With parameter \fBhelp\fR print a text which explains the meaning of the With parameter \fBhelp\fR print a text which explains the meaning of the
lines put out by "plain" and "el_torito". You probably will have to look lines put out by "plain". You probably will have to look
for more documentation which explains the technical details of the for more documentation which explains the technical details of the
mentioned boot facilities. mentioned boot facilities.
.br .br

View File

@ -1800,6 +1800,10 @@ int Xorriso_option_reassure(struct XorrisO *xorriso, char *mode, int flag);
int Xorriso_option_report_about(struct XorrisO *xorriso, char *severity, int Xorriso_option_report_about(struct XorrisO *xorriso, char *severity,
int flag); int flag);
/* Command -report_el_torito */
int Xorriso_option_report_el_torito(struct XorrisO *xorriso,
char *form, int flag);
/* Command -report_system_area */ /* Command -report_system_area */
int Xorriso_option_report_system_area(struct XorrisO *xorriso, int Xorriso_option_report_system_area(struct XorrisO *xorriso,
char *form, int flag); char *form, int flag);

View File

@ -3282,19 +3282,21 @@ File: xorriso.info, Node: Inquiry, Next: Navigate, Prev: DialogCtl, Up: Comm
The ones for new images may be set by command -volume_date. See The ones for new images may be set by command -volume_date. See
there for the meaning of the particular timestamps. there for the meaning of the particular timestamps.
-report_system_area "plain"|"el_torito"|"help"|"gpt_crc_of:"disk_path -report_el_torito "plain"|"help"
With parameter *plain* print a report about the information found
in the El Torito boot catalog of the loaded ISO image.
With parameter *help* print a text which explains the meaning of
the lines put out by "plain".
-report_system_area "plain"|"help"|"gpt_crc_of:"disk_path
With parameter *plain* print a report about the information found With parameter *plain* print a report about the information found
in the System Area of the loaded ISO image. The report consists of in the System Area of the loaded ISO image. The report consists of
zero to many lines with a header text, a colon, and information zero to many lines with a header text, a colon, and information
text. text.
With parameter *el_torito* print a report about the information
found in the El Torito boot catalog of the loaded ISO image. The
boot catalog is not actually a part of the system area. But its
data serve a similar purpose.
With parameter *help* print a text which explains the meaning of With parameter *help* print a text which explains the meaning of
the lines put out by "plain" and "el_torito". You probably will the lines put out by "plain". You probably will have to look for
have to look for more documentation which explains the technical more documentation which explains the technical details of the
details of the mentioned boot facilities. mentioned boot facilities.
With parameter *gpt_crc_of:*disk_path read up to 32 KiB from the With parameter *gpt_crc_of:*disk_path read up to 32 KiB from the
disk file with the path given after the colon. Compute the GPT disk file with the path given after the colon. Compute the GPT
compliant CRC number and print it to the result channel. The compliant CRC number and print it to the result channel. The
@ -5164,7 +5166,8 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -read_speed set read speed: Loading. (line 11) * -read_speed set read speed: Loading. (line 11)
* -reassure enables confirmation question: DialogCtl. (line 32) * -reassure enables confirmation question: DialogCtl. (line 32)
* -report_about controls verbosity: Exception. (line 55) * -report_about controls verbosity: Exception. (line 55)
* -report_system_area show MBR, GPT, and alike: Inquiry. (line 124) * -report_el_torito shows Boot Catalog: Inquiry. (line 124)
* -report_system_area shows MBR, GPT, and alike: Inquiry. (line 130)
* -return_with controls exit value: Exception. (line 39) * -return_with controls exit value: Exception. (line 39)
* -rm deletes files from ISO image: Manip. (line 21) * -rm deletes files from ISO image: Manip. (line 21)
* -rm_r deletes trees from ISO image: Manip. (line 28) * -rm_r deletes trees from ISO image: Manip. (line 28)
@ -5343,8 +5346,9 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Image, set volume id, -volid: SetWrite. (line 164) * Image, set volume id, -volid: SetWrite. (line 164)
* Image, set volume set id, -volset_id: SetWrite. (line 185) * Image, set volume set id, -volset_id: SetWrite. (line 185)
* Image, set volume timestamp, -volume_date: SetWrite. (line 212) * Image, set volume timestamp, -volume_date: SetWrite. (line 212)
* Image, show Boot Catalog: Inquiry. (line 124)
* Image, show id strings, -pvd_info: Inquiry. (line 115) * Image, show id strings, -pvd_info: Inquiry. (line 115)
* Image, show MBR, GPT, and alike, -pvd_info: Inquiry. (line 124) * Image, show MBR, GPT, and alike, -pvd_info: Inquiry. (line 130)
* Input Character Set, _definition: Charset. (line 25) * Input Character Set, _definition: Charset. (line 25)
* Insert, enable overwriting, -overwrite: SetInsert. (line 131) * Insert, enable overwriting, -overwrite: SetInsert. (line 131)
* Insert, file exclusion absolute, -not_paths: SetInsert. (line 55) * Insert, file exclusion absolute, -not_paths: SetInsert. (line 55)
@ -5550,34 +5554,34 @@ Node: Charset151157
Node: Exception154472 Node: Exception154472
Node: DialogCtl160592 Node: DialogCtl160592
Node: Inquiry163190 Node: Inquiry163190
Node: Navigate170612 Node: Navigate170611
Node: Verify178910 Node: Verify178909
Node: Restore188737 Node: Restore188736
Node: Emulation197341 Node: Emulation197340
Node: Scripting207729 Node: Scripting207728
Node: Frontend215500 Node: Frontend215499
Node: Examples225107 Node: Examples225106
Node: ExDevices226285 Node: ExDevices226284
Node: ExCreate226951 Node: ExCreate226950
Node: ExDialog228236 Node: ExDialog228235
Node: ExGrowing229501 Node: ExGrowing229500
Node: ExModifying230306 Node: ExModifying230305
Node: ExBootable230810 Node: ExBootable230809
Node: ExCharset231362 Node: ExCharset231361
Node: ExPseudo232254 Node: ExPseudo232253
Node: ExCdrecord233152 Node: ExCdrecord233151
Node: ExMkisofs233469 Node: ExMkisofs233468
Node: ExGrowisofs234809 Node: ExGrowisofs234808
Node: ExException235944 Node: ExException235943
Node: ExTime236398 Node: ExTime236397
Node: ExIncBackup236857 Node: ExIncBackup236856
Node: ExRestore240837 Node: ExRestore240836
Node: ExRecovery241770 Node: ExRecovery241769
Node: Files242340 Node: Files242339
Node: Seealso243639 Node: Seealso243638
Node: Bugreport244362 Node: Bugreport244361
Node: Legal244943 Node: Legal244942
Node: CommandIdx245954 Node: CommandIdx245953
Node: ConceptIdx262762 Node: ConceptIdx262834
 
End Tag Table End Tag Table

View File

@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps @c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection @c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1) @c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO 1 "Version 1.3.7, Apr 23, 2014" @c man .TH XORRISO 1 "Version 1.3.7, Apr 29, 2014"
@c man .\" Please adjust this date whenever revising the manpage. @c man .\" Please adjust this date whenever revising the manpage.
@c man .\" @c man .\"
@c man .\" Some roff macros, for reference: @c man .\" Some roff macros, for reference:
@ -4373,19 +4373,25 @@ The timestamps get not automatically propagated from loaded image to newly
written image. The ones for new images may be set by command -volume_date. written image. The ones for new images may be set by command -volume_date.
See there for the meaning of the particular timestamps. See there for the meaning of the particular timestamps.
@c man .TP @c man .TP
@item -report_system_area "plain"|"el_torito"|"help"|"gpt_crc_of:"disk_path @item -report_el_torito "plain"|"help"
@kindex -report_system_area show MBR, GPT, and alike @kindex -report_el_torito shows Boot Catalog
@cindex Image, show Boot Catalog
@*
With parameter @strong{plain} print a report about the information found
in the El Torito boot catalog of the loaded ISO image.
@*
With parameter @strong{help} print a text which explains the meaning of the
lines put out by "plain".
@c man .TP
@item -report_system_area "plain"|"help"|"gpt_crc_of:"disk_path
@kindex -report_system_area shows MBR, GPT, and alike
@cindex Image, show MBR, GPT, and alike, -pvd_info @cindex Image, show MBR, GPT, and alike, -pvd_info
With parameter @strong{plain} print a report about the information found in With parameter @strong{plain} print a report about the information found in
the System Area of the loaded ISO image. The report consists of zero to the System Area of the loaded ISO image. The report consists of zero to
many lines with a header text, a colon, and information text. many lines with a header text, a colon, and information text.
@* @*
With parameter @strong{el_torito} print a report about the information found
in the El Torito boot catalog of the loaded ISO image. The boot catalog is
not actually a part of the system area. But its data serve a similar purpose.
@*
With parameter @strong{help} print a text which explains the meaning of the With parameter @strong{help} print a text which explains the meaning of the
lines put out by "plain" and "el_torito". You probably will have to look lines put out by "plain". You probably will have to look
for more documentation which explains the technical details of the for more documentation which explains the technical details of the
mentioned boot facilities. mentioned boot facilities.
@* @*

View File

@ -1 +1 @@
#define Xorriso_timestamP "2014.04.25.064456" #define Xorriso_timestamP "2014.04.29.174832"