Unified width of index columns to 3 digits in output of iso_image_report_*()

This commit is contained in:
Thomas Schmitt 2014-04-29 19:39:42 +02:00
parent 443156e100
commit c07f42dfd4

View File

@ -4899,7 +4899,8 @@ int iso_impsysa_report(IsoImage *image, struct iso_impsysa_result *target,
} }
for (i = 0; i < sai->mbr_req_count; i++) { for (i = 0; i < sai->mbr_req_count; i++) {
part = sai->mbr_req[i]; part = sai->mbr_req[i];
sprintf(msg, "MBR partition : %d 0x%2.2x 0x%2.2x %11.f %11.f", sprintf(msg,
"MBR partition : %3d 0x%2.2x 0x%2.2x %11.f %11.f",
part->desired_slot, part->desired_slot,
(unsigned int) part->status_byte, (unsigned int) part->status_byte,
(unsigned int) part->type_byte, (unsigned int) part->type_byte,
@ -4910,7 +4911,7 @@ int iso_impsysa_report(IsoImage *image, struct iso_impsysa_result *target,
part = sai->mbr_req[i]; part = sai->mbr_req[i];
if (part->block_count == 0) if (part->block_count == 0)
continue; continue;
sprintf(msg, "MBR partition path : %d ", part->desired_slot); sprintf(msg, "MBR partition path : %3d ", part->desired_slot);
iso_impsysa_report_blockpath(image, target, msg, iso_impsysa_report_blockpath(image, target, msg,
(uint32_t) (part->start_block / 4), 0); (uint32_t) (part->start_block / 4), 0);
} }
@ -4926,13 +4927,13 @@ int iso_impsysa_report(IsoImage *image, struct iso_impsysa_result *target,
iso_impsysa_line(target, msg); iso_impsysa_line(target, msg);
for (i = 0; i < sai->num_mips_boot_files; i++) { for (i = 0; i < sai->num_mips_boot_files; i++) {
sprintf(msg, sprintf(msg,
"MIPS-BE boot entry : %2d %8s %10u %10u", "MIPS-BE boot entry : %3d %8s %10u %10u",
i + 1, sai->mips_vd_entries[i]->name, i + 1, sai->mips_vd_entries[i]->name,
sai->mips_vd_entries[i]->boot_block, sai->mips_vd_entries[i]->boot_block,
sai->mips_vd_entries[i]->boot_bytes); sai->mips_vd_entries[i]->boot_bytes);
iso_impsysa_line(target, msg); iso_impsysa_line(target, msg);
if (sai->mips_boot_file_paths[i] != NULL) { if (sai->mips_boot_file_paths[i] != NULL) {
sprintf(msg, "MIPS-BE boot path : %2d ", i + 1); sprintf(msg, "MIPS-BE boot path : %3d ", i + 1);
iso_impsysa_report_text(target, msg, iso_impsysa_report_text(target, msg,
sai->mips_boot_file_paths[i], 0); sai->mips_boot_file_paths[i], 0);
} }
@ -4965,7 +4966,7 @@ int iso_impsysa_report(IsoImage *image, struct iso_impsysa_result *target,
for (i = 0; i < sai->sparc_entry_count; i++) { for (i = 0; i < sai->sparc_entry_count; i++) {
sparc_entry = sai->sparc_entries + i; sparc_entry = sai->sparc_entries + i;
sprintf(msg, sprintf(msg,
"SUN SPARC partition: %d 0x%4.4x 0x%4.4x %10u %10u", "SUN SPARC partition: %3d 0x%4.4x 0x%4.4x %10u %10u",
sparc_entry->idx, sparc_entry->idx,
sparc_entry->id_tag, sparc_entry->permissions, sparc_entry->id_tag, sparc_entry->permissions,
sparc_entry->start_cyl, sparc_entry->num_blocks); sparc_entry->start_cyl, sparc_entry->num_blocks);
@ -5086,17 +5087,17 @@ int iso_impsysa_report(IsoImage *image, struct iso_impsysa_result *target,
for (i = 0; i < sai->apm_req_count; i++) { for (i = 0; i < sai->apm_req_count; i++) {
apm_entry = sai->apm_req[i]; apm_entry = sai->apm_req[i];
idx = i + 1; idx = i + 1;
sprintf(msg, "APM partition name : %2d %s", idx, apm_entry->name); sprintf(msg, "APM partition name : %3d %s", idx, apm_entry->name);
iso_impsysa_line(target, msg); iso_impsysa_line(target, msg);
sprintf(msg, "APM partition type : %2d %s", idx, apm_entry->type); sprintf(msg, "APM partition type : %3d %s", idx, apm_entry->type);
iso_impsysa_line(target, msg); iso_impsysa_line(target, msg);
sprintf(msg, "APM start and size : %2d %.f %.f", idx, sprintf(msg, "APM start and size : %3d %.f %.f", idx,
(double) apm_entry->start_block, (double) apm_entry->start_block,
(double) apm_entry->block_count); (double) apm_entry->block_count);
iso_impsysa_line(target, msg); iso_impsysa_line(target, msg);
if (apm_entry->block_count == 0) if (apm_entry->block_count == 0)
continue; continue;
sprintf(msg, "APM partition path : %2d ", idx); sprintf(msg, "APM partition path : %3d ", idx);
iso_impsysa_report_blockpath(image, target, msg, iso_impsysa_report_blockpath(image, target, msg,
(uint32_t) (apm_entry->start_block / (uint32_t) (apm_entry->start_block /
(2048 / sai->apm_block_size)), (2048 / sai->apm_block_size)),