Improved assessment of appended partitions
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
|
||||
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
|
||||
|
||||
Copyright 2007-2014 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
|
||||
@ -2459,9 +2459,10 @@ int Xorriso_file_eval_damage(struct XorrisO *xorriso, IsoNode *node,
|
||||
|
||||
|
||||
/* @param flag bit0= report_sections : section size rather than total size
|
||||
bit1= last_data_file_block : looking for highest data file block
|
||||
*/
|
||||
int Xorriso_report_lba(struct XorrisO *xorriso, char *show_path,
|
||||
IsoNode *node, int flag)
|
||||
IsoNode *node, uint32_t *last_block, int flag)
|
||||
{
|
||||
int ret, *start_lbas= NULL, *end_lbas= NULL, lba_count, i;
|
||||
off_t size, *section_sizes= NULL;
|
||||
@ -2477,12 +2478,17 @@ int Xorriso_report_lba(struct XorrisO *xorriso, char *show_path,
|
||||
for(i= 0; i < lba_count; i++) {
|
||||
if(flag & 1)
|
||||
size= section_sizes[i];
|
||||
sprintf(xorriso->result_line,
|
||||
"File data lba: %2d , %8d , %8d , %8.f , ",
|
||||
i, start_lbas[i], end_lbas[i] + 1 - start_lbas[i], (double) size);
|
||||
Text_shellsafe(show_path, xorriso->result_line, 1);
|
||||
strcat(xorriso->result_line, "\n");
|
||||
Xorriso_result(xorriso, 0);
|
||||
if(flag & 2) {
|
||||
if(end_lbas[i] > 0 && (uint32_t) end_lbas[i] > *last_block)
|
||||
*last_block= end_lbas[i];
|
||||
} else {
|
||||
sprintf(xorriso->result_line,
|
||||
"File data lba: %2d , %8d , %8d , %8.f , ",
|
||||
i, start_lbas[i], end_lbas[i] + 1 - start_lbas[i], (double) size);
|
||||
Text_shellsafe(show_path, xorriso->result_line, 1);
|
||||
strcat(xorriso->result_line, "\n");
|
||||
Xorriso_result(xorriso, 0);
|
||||
}
|
||||
}
|
||||
ret= 1;
|
||||
ex:;
|
||||
|
Reference in New Issue
Block a user