New -report_system_area form "el_torito"

This commit is contained in:
Thomas Schmitt 2014-04-24 08:41:28 +00:00
parent 9b60b95d92
commit 70e8467759
6 changed files with 144 additions and 68 deletions

View File

@ -1424,22 +1424,76 @@ ex:;
}
static void Xorriso_report_lines(struct XorrisO *xorriso,
char **lines, int line_count)
{
int i;
for(i = 0; i < line_count ; i++) {
sprintf(xorriso->result_line, "%s\n", lines[i]);
Xorriso_result(xorriso,0);
}
}
/* @param flag bit0= report El Torito rather than System Area
*/
int Xorriso_report_system_area(struct XorrisO *xorriso, char *form, int flag)
{
int ret, line_count, i;
int ret, line_count, is_elto= 0;
char **lines = NULL;
IsoImage *image;
if(strcmp(form, "help") == 0) {
ret= iso_image_report_system_area(NULL, &lines, &line_count, 1);
if(ret <= 0)
goto ex;
sprintf(xorriso->result_line,
"------------------------------------------------------------------------------\n");
Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line, "With -report_system_area \"plain\":\n");
Xorriso_result(xorriso, 0);
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,
"------------------------------------------------------------------------------\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");
Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line, "\n");
Xorriso_result(xorriso, 0);
} else if(strcmp(form, "") == 0 || strcmp(form, "plain") == 0) {
ret= Xorriso_get_volume(xorriso, &image, 0);
if(ret <= 0)
goto ex;
ret= iso_image_report_system_area(image, &lines, &line_count, 0);
} else if(strcmp(form, "el_torito") == 0) {
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);
goto ex;
} else {
strcpy(xorriso->info_text,
"-report_system_area form parameter not recognized: ");
@ -1449,25 +1503,31 @@ int Xorriso_report_system_area(struct XorrisO *xorriso, char *form, int flag)
}
if(ret < 0)
goto ex;
if(lines == 0 || ret == 0) {
if(lines == NULL || ret == 0) {
if(is_elto)
strcpy(xorriso->info_text, "No El Torito information was loaded");
else
strcpy(xorriso->info_text, "No System Area was loaded");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
ret= 2; goto ex;
}
if(line_count == 0) {
if(is_elto)
strcpy(xorriso->info_text, "No El Torito information available");
else
strcpy(xorriso->info_text, "System Area only contains 0-bytes");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
ret= 2; goto ex;
}
for(i = 0; i < line_count ; i++) {
sprintf(xorriso->result_line, "%s\n", lines[i]);
Xorriso_result(xorriso,0);
}
Xorriso_report_lines(xorriso, lines, line_count);
ret= 1;
ex:;
if(lines != NULL)
if(lines != NULL) {
if(is_elto)
iso_image_report_el_torito(NULL, &lines, &line_count, 1 << 15);
else
iso_image_report_system_area(NULL, &lines, &line_count, 1 << 15);
}
return(ret);
}

View File

@ -1783,12 +1783,14 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
"",
" -tell_media_space",
" 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 form",
" Form \"plain\" prints information about recognized information",
" -report_system_area \"plain\"|\"el_torito\"|\"help\"|\"gpt_crc_of:\"disk_path",
" \"plain\" prints information about recognized data",
" in the System Area of the loaded ISO image: MBR, GPT, ...",
" Form \"help\" prints an explanation of the output format.",
" \"el_torito\" prints data from the El Torito boot catalog.",
" \"help\" prints an explanation of the output format.",
" \"gpt_crc_of:\" prints GPT CRC of file disk_path.",
"",
"Commands with variable length path list [...] need the list delimiter text",
"as end mark if they are followed by another command. By default this",

View File

@ -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.3.7, Apr 21, 2014"
.TH XORRISO 1 "Version 1.3.7, Apr 23, 2014"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -3760,17 +3760,22 @@ 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.
See there for the meaning of the particular timestamps.
.TP
\fB\-report_system_area\fR "plain"|"help"|"gpt_crc_of:"disk_path
With parameter "plain" print a report about the information found in
\fB\-report_system_area\fR "plain"|"el_torito"|"help"|"gpt_crc_of:"disk_path
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
many lines with a header text, a colon, and information text.
.br
With parameter "help" print a text which explains the meaning of the
lines. You probably will have to look for more documentation which explains
the technical properties of the mentioned boot facilities.
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 "gpt_crc_of:"disk_path read up to 32 KiB from the disk file
with the path given after the colon. Compute the GPT compliant CRC number
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
for more documentation which explains the technical details of the
mentioned boot facilities.
.br
With parameter \fBgpt_crc_of:\fRdisk_path read up to 32 KiB from the disk
file with the path given after the colon. Compute the GPT compliant CRC number
and print it to the result channel. The number is shown like "0x690fd979".
The special disk_path "\-" causes reading from standard input.
.TP

View File

@ -3282,16 +3282,20 @@ File: xorriso.info, Node: Inquiry, Next: Navigate, Prev: DialogCtl, Up: Comm
The ones for new images may be set by command -volume_date. See
there for the meaning of the particular timestamps.
-report_system_area "plain"|"help"|"gpt_crc_of:"disk_path
With parameter "plain" print a report about the information found
-report_system_area "plain"|"el_torito"|"help"|"gpt_crc_of:"disk_path
With parameter *plain* print a report about the information found
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
text.
With parameter "help" print a text which explains the meaning of
the lines. You probably will have to look for more documentation
which explains the technical properties of the mentioned boot
facilities.
With parameter "gpt_crc_of:"disk_path read up to 32 KiB from the
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
the lines put out by "plain" and "el_torito". You probably will
have to look for more documentation which explains the technical
details of the mentioned boot facilities.
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
compliant CRC number and print it to the result channel. The
number is shown like "0x690fd979". The special disk_path "-"
@ -5546,34 +5550,34 @@ Node: Charset151157
Node: Exception154472
Node: DialogCtl160592
Node: Inquiry163190
Node: Navigate170325
Node: Verify178623
Node: Restore188450
Node: Emulation197054
Node: Scripting207442
Node: Frontend215213
Node: Examples224820
Node: ExDevices225998
Node: ExCreate226664
Node: ExDialog227949
Node: ExGrowing229214
Node: ExModifying230019
Node: ExBootable230523
Node: ExCharset231075
Node: ExPseudo231967
Node: ExCdrecord232865
Node: ExMkisofs233182
Node: ExGrowisofs234522
Node: ExException235657
Node: ExTime236111
Node: ExIncBackup236570
Node: ExRestore240550
Node: ExRecovery241483
Node: Files242053
Node: Seealso243352
Node: Bugreport244075
Node: Legal244656
Node: CommandIdx245667
Node: ConceptIdx262475
Node: Navigate170612
Node: Verify178910
Node: Restore188737
Node: Emulation197341
Node: Scripting207729
Node: Frontend215500
Node: Examples225107
Node: ExDevices226285
Node: ExCreate226951
Node: ExDialog228236
Node: ExGrowing229501
Node: ExModifying230306
Node: ExBootable230810
Node: ExCharset231362
Node: ExPseudo232254
Node: ExCdrecord233152
Node: ExMkisofs233469
Node: ExGrowisofs234809
Node: ExException235944
Node: ExTime236398
Node: ExIncBackup236857
Node: ExRestore240837
Node: ExRecovery241770
Node: Files242340
Node: Seealso243639
Node: Bugreport244362
Node: Legal244943
Node: CommandIdx245954
Node: ConceptIdx262762

End Tag Table

View File

@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps
@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 .TH XORRISO 1 "Version 1.3.7, Apr 21, 2014"
@c man .TH XORRISO 1 "Version 1.3.7, Apr 23, 2014"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -4373,19 +4373,24 @@ 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.
See there for the meaning of the particular timestamps.
@c man .TP
@item -report_system_area "plain"|"help"|"gpt_crc_of:"disk_path
@item -report_system_area "plain"|"el_torito"|"help"|"gpt_crc_of:"disk_path
@kindex -report_system_area show MBR, GPT, and alike
@cindex Image, show MBR, GPT, and alike, -pvd_info
With parameter "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
many lines with a header text, a colon, and information text.
@*
With parameter "help" print a text which explains the meaning of the
lines. You probably will have to look for more documentation which explains
the technical properties of the mentioned boot facilities.
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 "gpt_crc_of:"disk_path read up to 32 KiB from the disk file
with the path given after the colon. Compute the GPT compliant CRC number
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
for more documentation which explains the technical details of the
mentioned boot facilities.
@*
With parameter @strong{gpt_crc_of:}disk_path read up to 32 KiB from the disk
file with the path given after the colon. Compute the GPT compliant CRC number
and print it to the result channel. The number is shown like "0x690fd979".
The special disk_path "-" causes reading from standard input.
@end table

View File

@ -1 +1 @@
#define Xorriso_timestamP "2014.04.21.165612"
#define Xorriso_timestamP "2014.04.24.084041"