New -find action report_sections

This commit is contained in:
2014-06-13 09:03:28 +00:00
parent be012f8d45
commit f9ac68c207
10 changed files with 104 additions and 69 deletions

View File

@ -2762,11 +2762,14 @@ int Xorriso_findi_action(struct XorrisO *xorriso, struct FindjoB *job,
}
ret= 1;
} else if(action == 50) {
} else if(action == 50) { /* print_outname */
ret= Xorriso_test_outchar(xorriso, (void *) node, type, 1);
if(ret <= 0)
return(ret);
} else if(action == 51) { /* report_sections */
ret= Xorriso_report_lba(xorriso, show_path, node, 1);
} else { /* includes : 15 in_iso */
Xorriso_esc_filepath(xorriso, show_path, xorriso->result_line, 0);
strcat(xorriso->result_line, "\n");
@ -2841,7 +2844,7 @@ return:
void *arg1, *arg2;
char ft, *decision, md5[16], bless_code[17];
regmatch_t name_match;
off_t damage_start, damage_end, size;
off_t damage_start, damage_end, size, *section_sizes= NULL;
void *xinfo_dummy;
IsoNode *node;
IsoStream *stream;
@ -2928,8 +2931,8 @@ return:
value= !(start_lba >= 0);
goto ex;
}
ret= Xorriso__start_end_lbas(node, &lba_count,
&file_start_lbas, &file_end_lbas, &size, 0);
ret= Xorriso__start_end_lbas(node, &lba_count, &file_start_lbas,
&file_end_lbas, &section_sizes, &size, 0);
if(ret <= 0) {
if(ret < 0)
Xorriso_process_msg_queues(xorriso, 0);
@ -3095,6 +3098,8 @@ ex:;
free((char *) file_start_lbas);
if(file_end_lbas != NULL)
free((char *) file_end_lbas);
if(section_sizes != NULL)
free((char *) section_sizes);
return(value);
}
@ -3125,10 +3130,11 @@ int Xorriso_findi_headline(struct XorrisO *xorriso, struct FindjoB *job,
sprintf(xorriso->result_line, "Report layout: %8s , %8s , %8s , %s\n",
"at byte", "Range", "Filesize", "ISO image path");
Xorriso_result(xorriso, 0);
} else if(action == 22) { /* report_lba */
} else if(action == 22 || action == 51) { /* report_lba, report_sections */
sprintf(xorriso->result_line,
"Report layout: %2s , %8s , %8s , %8s , %s\n",
"xt", "Startlba", "Blocks", "Filesize", "ISO image path");
"xt", "Startlba", "Blocks", action == 22 ? "Filesize" : "Sectsize",
"ISO image path");
Xorriso_result(xorriso, 0);
}
return(1);