New -report_system_area form "el_torito"
This commit is contained in:
parent
9b60b95d92
commit
70e8467759
@ -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 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;
|
char **lines = NULL;
|
||||||
IsoImage *image;
|
IsoImage *image;
|
||||||
|
|
||||||
if(strcmp(form, "help") == 0) {
|
if(strcmp(form, "help") == 0) {
|
||||||
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)
|
||||||
|
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) {
|
} else if(strcmp(form, "") == 0 || strcmp(form, "plain") == 0) {
|
||||||
ret= Xorriso_get_volume(xorriso, &image, 0);
|
ret= Xorriso_get_volume(xorriso, &image, 0);
|
||||||
if(ret <= 0)
|
if(ret <= 0)
|
||||||
goto ex;
|
goto ex;
|
||||||
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) {
|
||||||
|
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) {
|
} 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,
|
strcpy(xorriso->info_text,
|
||||||
"-report_system_area form parameter not recognized: ");
|
"-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)
|
if(ret < 0)
|
||||||
goto ex;
|
goto ex;
|
||||||
if(lines == 0 || ret == 0) {
|
if(lines == NULL || ret == 0) {
|
||||||
strcpy(xorriso->info_text, "No System Area was loaded");
|
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);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||||
ret= 2; goto ex;
|
ret= 2; goto ex;
|
||||||
}
|
}
|
||||||
if(line_count == 0) {
|
if(line_count == 0) {
|
||||||
strcpy(xorriso->info_text, "System Area only contains 0-bytes");
|
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);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||||
ret= 2; goto ex;
|
ret= 2; goto ex;
|
||||||
}
|
}
|
||||||
for(i = 0; i < line_count ; i++) {
|
Xorriso_report_lines(xorriso, lines, line_count);
|
||||||
sprintf(xorriso->result_line, "%s\n", lines[i]);
|
|
||||||
Xorriso_result(xorriso,0);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret= 1;
|
ret= 1;
|
||||||
ex:;
|
ex:;
|
||||||
if(lines != NULL)
|
if(lines != NULL) {
|
||||||
iso_image_report_system_area(NULL, &lines, &line_count, 1 << 15);
|
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);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1783,12 +1783,14 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
|||||||
"",
|
"",
|
||||||
" -tell_media_space",
|
" -tell_media_space",
|
||||||
" 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 form",
|
" -report_system_area \"plain\"|\"el_torito\"|\"help\"|\"gpt_crc_of:\"disk_path",
|
||||||
" Form \"plain\" prints information about recognized information",
|
" \"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, ...",
|
||||||
" 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",
|
"Commands with variable length path list [...] need the list delimiter text",
|
||||||
"as end mark if they are followed by another command. By default this",
|
"as end mark if they are followed by another command. By default this",
|
||||||
|
@ -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 21, 2014"
|
.TH XORRISO 1 "Version 1.3.7, Apr 23, 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,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.
|
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"|"help"|"gpt_crc_of:"disk_path
|
\fB\-report_system_area\fR "plain"|"el_torito"|"help"|"gpt_crc_of:"disk_path
|
||||||
With parameter "plain" 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 "help" print a text which explains the meaning of the
|
With parameter \fBel_torito\fR print a report about the information found
|
||||||
lines. You probably will have to look for more documentation which explains
|
in the El Torito boot catalog of the loaded ISO image. The boot catalog is
|
||||||
the technical properties of the mentioned boot facilities.
|
not actually a part of the system area. But its data serve a similar purpose.
|
||||||
.br
|
.br
|
||||||
With parameter "gpt_crc_of:"disk_path read up to 32 KiB from the disk file
|
With parameter \fBhelp\fR print a text which explains the meaning of the
|
||||||
with the path given after the colon. Compute the GPT compliant CRC number
|
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".
|
and print it to the result channel. The number is shown like "0x690fd979".
|
||||||
The special disk_path "\-" causes reading from standard input.
|
The special disk_path "\-" causes reading from standard input.
|
||||||
.TP
|
.TP
|
||||||
|
@ -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
|
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"|"help"|"gpt_crc_of:"disk_path
|
-report_system_area "plain"|"el_torito"|"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 "help" print a text which explains the meaning of
|
With parameter *el_torito* print a report about the information
|
||||||
the lines. You probably will have to look for more documentation
|
found in the El Torito boot catalog of the loaded ISO image. The
|
||||||
which explains the technical properties of the mentioned boot
|
boot catalog is not actually a part of the system area. But its
|
||||||
facilities.
|
data serve a similar purpose.
|
||||||
With parameter "gpt_crc_of:"disk_path read up to 32 KiB from the
|
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
|
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
|
||||||
number is shown like "0x690fd979". The special disk_path "-"
|
number is shown like "0x690fd979". The special disk_path "-"
|
||||||
@ -5546,34 +5550,34 @@ Node: Charset151157
|
|||||||
Node: Exception154472
|
Node: Exception154472
|
||||||
Node: DialogCtl160592
|
Node: DialogCtl160592
|
||||||
Node: Inquiry163190
|
Node: Inquiry163190
|
||||||
Node: Navigate170325
|
Node: Navigate170612
|
||||||
Node: Verify178623
|
Node: Verify178910
|
||||||
Node: Restore188450
|
Node: Restore188737
|
||||||
Node: Emulation197054
|
Node: Emulation197341
|
||||||
Node: Scripting207442
|
Node: Scripting207729
|
||||||
Node: Frontend215213
|
Node: Frontend215500
|
||||||
Node: Examples224820
|
Node: Examples225107
|
||||||
Node: ExDevices225998
|
Node: ExDevices226285
|
||||||
Node: ExCreate226664
|
Node: ExCreate226951
|
||||||
Node: ExDialog227949
|
Node: ExDialog228236
|
||||||
Node: ExGrowing229214
|
Node: ExGrowing229501
|
||||||
Node: ExModifying230019
|
Node: ExModifying230306
|
||||||
Node: ExBootable230523
|
Node: ExBootable230810
|
||||||
Node: ExCharset231075
|
Node: ExCharset231362
|
||||||
Node: ExPseudo231967
|
Node: ExPseudo232254
|
||||||
Node: ExCdrecord232865
|
Node: ExCdrecord233152
|
||||||
Node: ExMkisofs233182
|
Node: ExMkisofs233469
|
||||||
Node: ExGrowisofs234522
|
Node: ExGrowisofs234809
|
||||||
Node: ExException235657
|
Node: ExException235944
|
||||||
Node: ExTime236111
|
Node: ExTime236398
|
||||||
Node: ExIncBackup236570
|
Node: ExIncBackup236857
|
||||||
Node: ExRestore240550
|
Node: ExRestore240837
|
||||||
Node: ExRecovery241483
|
Node: ExRecovery241770
|
||||||
Node: Files242053
|
Node: Files242340
|
||||||
Node: Seealso243352
|
Node: Seealso243639
|
||||||
Node: Bugreport244075
|
Node: Bugreport244362
|
||||||
Node: Legal244656
|
Node: Legal244943
|
||||||
Node: CommandIdx245667
|
Node: CommandIdx245954
|
||||||
Node: ConceptIdx262475
|
Node: ConceptIdx262762
|
||||||
|
|
||||||
End Tag Table
|
End Tag Table
|
||||||
|
@ -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 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 .\" 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,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.
|
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"|"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
|
@kindex -report_system_area show MBR, GPT, and alike
|
||||||
@cindex Image, show MBR, GPT, and alike, -pvd_info
|
@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
|
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 "help" print a text which explains the meaning of the
|
With parameter @strong{el_torito} print a report about the information found
|
||||||
lines. You probably will have to look for more documentation which explains
|
in the El Torito boot catalog of the loaded ISO image. The boot catalog is
|
||||||
the technical properties of the mentioned boot facilities.
|
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 parameter @strong{help} print a text which explains the meaning of the
|
||||||
with the path given after the colon. Compute the GPT compliant CRC number
|
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".
|
and print it to the result channel. The number is shown like "0x690fd979".
|
||||||
The special disk_path "-" causes reading from standard input.
|
The special disk_path "-" causes reading from standard input.
|
||||||
@end table
|
@end table
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2014.04.21.165612"
|
#define Xorriso_timestamP "2014.04.24.084041"
|
||||||
|
Loading…
Reference in New Issue
Block a user