New command -report_system_area

master
Thomas Schmitt 9 years ago
parent eb2e931268
commit c6d9423051
  1. 1
      libisoburn/libisoburn.ver
  2. 50
      xorriso/iso_img.c
  3. 5
      xorriso/opts_d_h.c
  4. 11
      xorriso/opts_p_z.c
  5. 8
      xorriso/parse_exec.c
  6. 11
      xorriso/xorriso.1
  7. 4
      xorriso/xorriso.h
  8. 70
      xorriso/xorriso.info
  9. 13
      xorriso/xorriso.texi
  10. 2
      xorriso/xorriso_timestamp.h
  11. 1
      xorriso/xorrisoburn.h

@ -264,6 +264,7 @@ Xorriso_option_pwdx;
Xorriso_option_read_mkisofsrc;
Xorriso_option_reassure;
Xorriso_option_report_about;
Xorriso_report_system_area;
Xorriso_option_return_with;
Xorriso_option_rmi;
Xorriso_option_rockridge;

@ -1390,3 +1390,53 @@ hint_revoke:;
return(0);
}
int Xorriso_report_system_area(struct XorrisO *xorriso, char *form, int flag)
{
int ret;
char *text = NULL, *cpt, *npt;
IsoImage *image;
if(strcmp(form, "help") == 0) {
ret= iso_image_report_system_area(NULL, &text, 1);
} 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, &text, 0);
} else {
strcpy(xorriso->info_text,
"-report_system_area form parameter not recognized: ");
Text_shellsafe(form, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex;
}
if(ret < 0)
goto ex;
if(text == NULL || ret == 0) {
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(text[0] == 0) {
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(npt= cpt= text; npt != NULL; cpt= npt + 1) {
npt= strchr(cpt, '\n');
if(npt == NULL)
strcpy(xorriso->result_line, cpt);
else {
strncpy(xorriso->result_line, cpt, npt - cpt + 1);
xorriso->result_line[npt - cpt + 1]= 0;
}
Xorriso_result(xorriso,0);
}
ret= 1;
ex:;
if(text != NULL)
free(text);
return(ret);
}

@ -1738,6 +1738,11 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" Print foreseeable available space on output medium",
" -pvd_info Print various id strings of the loaded ISO image."
"",
" -report_system_area form",
" Form \"plain\" prints information about recognized information",
" in the System Area of the loaded ISO image: MBR, GPT, ...",
" Form \"help\" prints an explanation of the output format.",
"",
"Commands with variable length path list [...] need the list delimiter text",
"as end mark if they are followed by another command. By default this",
"delimiter is \"--\". In dialog and with commands read from files, the line",

@ -491,6 +491,17 @@ int Xorriso_option_report_about(struct XorrisO *xorriso, char *in_severity,
}
/* Command -report_system_area */
int Xorriso_option_report_system_area(struct XorrisO *xorriso,
char *form, int flag)
{
int ret;
ret= Xorriso_report_system_area(xorriso, form, 0);
return(ret);
}
/* Option -return_with */
int Xorriso_option_return_with(struct XorrisO *xorriso, char *in_severity,
int exit_value, int flag)

@ -531,7 +531,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","rockridge",
"read_speed","reassure","report_about","report_system_area","rockridge",
"rom_toc_scan","rr_reloc_dir","scsi_log",
"session_log","sh_style_result","signal_handling","sleep",
"speed","split_size","status","status_history_max",
@ -679,7 +679,7 @@ int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso,
"* Drive and media related inquiry actions (2):",
"list_profiles", "list_formats", "list_speeds",
"toc", "toc_of", "pvd_info",
"toc", "toc_of", "pvd_info", "report_system_area",
"* Settings for file insertion:",
"file_size_limit", "not_mgt", "not_paths", "not_leaf", "not_list",
@ -1640,6 +1640,10 @@ next_command:;
(*idx)++;
ret= Xorriso_option_report_about(xorriso, arg1, 0);
} else if(strcmp(cmd,"report_system_area")==0) {
(*idx)++;
ret= Xorriso_option_report_system_area(xorriso, arg1, 0);
} else if(strcmp(cmd,"return_with")==0) {
(*idx)+= 2;
num2= 0;

@ -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 09, 2014"
.TH XORRISO 1 "Version 1.3.7, Apr 11, 2014"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -3741,6 +3741,15 @@ 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"
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.
.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.
.TP
.B Navigation in ISO image and disk filesystem:
.TP
\fB\-cd\fR iso_rr_path

@ -1795,6 +1795,10 @@ int Xorriso_option_reassure(struct XorrisO *xorriso, char *mode, int flag);
int Xorriso_option_report_about(struct XorrisO *xorriso, char *severity,
int flag);
/* Command -report_system_area */
int Xorriso_option_report_system_area(struct XorrisO *xorriso,
char *form, int flag);
/* Command -return_with */
int Xorriso_option_return_with(struct XorrisO *xorriso, char *severity,
int exit_value, int flag);

@ -3265,6 +3265,16 @@ 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"
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.

File: xorriso.info, Node: Navigate, Next: Verify, Prev: Inquiry, Up: Commands
@ -5090,6 +5100,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -read_speed set read speed: Loading. (line 11)
* -reassure enables confirmation question: DialogCtl. (line 32)
* -report_about controls verbosity: Exception. (line 55)
* -report_system_area show MBR, GPT, and alike: Inquiry. (line 124)
* -return_with controls exit value: Exception. (line 39)
* -rm deletes files from ISO image: Manip. (line 21)
* -rm_r deletes trees from ISO image: Manip. (line 28)
@ -5268,6 +5279,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Image, set volume set id, -volset_id: SetWrite. (line 185)
* Image, set volume timestamp, -volume_date: SetWrite. (line 212)
* Image, show id strings, -pvd_info: Inquiry. (line 115)
* Image, show MBR, GPT, and alike, -pvd_info: Inquiry. (line 124)
* Input Character Set, _definition: Charset. (line 25)
* Insert, enable overwriting, -overwrite: SetInsert. (line 127)
* Insert, file exclusion absolute, -not_paths: SetInsert. (line 55)
@ -5473,34 +5485,34 @@ Node: Charset150178
Node: Exception153493
Node: DialogCtl159613
Node: Inquiry162211
Node: Navigate168528
Node: Verify176826
Node: Restore186090
Node: Emulation193177
Node: Scripting203565
Node: Frontend211336
Node: Examples220943
Node: ExDevices222121
Node: ExCreate222787
Node: ExDialog224072
Node: ExGrowing225337
Node: ExModifying226142
Node: ExBootable226646
Node: ExCharset227198
Node: ExPseudo228090
Node: ExCdrecord228988
Node: ExMkisofs229305
Node: ExGrowisofs230645
Node: ExException231780
Node: ExTime232234
Node: ExIncBackup232693
Node: ExRestore236673
Node: ExRecovery237606
Node: Files238176
Node: Seealso239475
Node: Bugreport240198
Node: Legal240779
Node: CommandIdx241790
Node: ConceptIdx258452
Node: Navigate169011
Node: Verify177309
Node: Restore186573
Node: Emulation193660
Node: Scripting204048
Node: Frontend211819
Node: Examples221426
Node: ExDevices222604
Node: ExCreate223270
Node: ExDialog224555
Node: ExGrowing225820
Node: ExModifying226625
Node: ExBootable227129
Node: ExCharset227681
Node: ExPseudo228573
Node: ExCdrecord229471
Node: ExMkisofs229788
Node: ExGrowisofs231128
Node: ExException232263
Node: ExTime232717
Node: ExIncBackup233176
Node: ExRestore237156
Node: ExRecovery238089
Node: Files238659
Node: Seealso239958
Node: Bugreport240681
Node: Legal241262
Node: CommandIdx242273
Node: ConceptIdx259008

End Tag Table

@ -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 09, 2014"
@c man .TH XORRISO 1 "Version 1.3.7, Apr 11, 2014"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -4353,6 +4353,17 @@ For these IDs -pvd_info reports what would be written with the next -commit.
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"
@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
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.
@end table
@c man .TP
@c man .B Navigation in ISO image and disk filesystem:

@ -1 +1 @@
#define Xorriso_timestamP "2014.04.10.072212"
#define Xorriso_timestamP "2014.04.11.161139"

@ -620,6 +620,7 @@ int Xorriso_pretend_full_disc(struct XorrisO *xorriso, int flag);
int Xorriso_apply_sort_file(struct XorrisO *xorriso, char *path, int flag);
int Xorriso_report_system_area(struct XorrisO *xorriso, char *form, int flag);
#endif /* Xorrisoburn_includeD */

Loading…
Cancel
Save