1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 23:22:37 +02:00

A bunch of cosmetic improvements

- Fix typos and inconsistencies.
 - Drop duplicate line which tells us the chip name twice.
 - Also print the chip vendor, not only the name.

Corresponding to flashrom svn r249 and coreboot v2 svn r3348.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
This commit is contained in:
Uwe Hermann 2008-05-22 22:47:04 +00:00
parent bf579488a4
commit 793bdcd71e
3 changed files with 8 additions and 8 deletions

View File

@ -701,7 +701,7 @@ int board_flash_enable(const char *vendor, const char *part)
board = board_match_pci_card_ids(); board = board_match_pci_card_ids();
if (board) { if (board) {
printf("Found board \"%s\": enabling flash write... ", printf("Found board \"%s\", enabling flash write... ",
board->name); board->name);
ret = board->enable(board->name); ret = board->enable(board->name);

View File

@ -154,7 +154,7 @@ static int enable_flash_ich(struct pci_dev *dev, const char *name,
*/ */
old = pci_read_byte(dev, bios_cntl); old = pci_read_byte(dev, bios_cntl);
printf_debug("BIOS Lock Enable: %sabled, ", printf_debug("\nBIOS Lock Enable: %sabled, ",
(old & (1 << 1)) ? "en" : "dis"); (old & (1 << 1)) ? "en" : "dis");
printf_debug("BIOS Write Enable: %sabled, ", printf_debug("BIOS Write Enable: %sabled, ",
(old & (1 << 0)) ? "en" : "dis"); (old & (1 << 0)) ? "en" : "dis");

View File

@ -151,8 +151,9 @@ struct flashchip *probe_flash(struct flashchip *flash)
flash->virtual_memory = bios; flash->virtual_memory = bios;
if (flash->probe(flash) == 1) { if (flash->probe(flash) == 1) {
printf("%s found at physical address 0x%lx.\n", printf("Found chip \"%s %s\" (%d KB) at physical address 0x%lx.\n",
flash->name, flash_baseaddr); flash->vendor, flash->name, flash->total_size,
flash_baseaddr);
return flash; return flash;
} }
munmap((void *)bios, size); munmap((void *)bios, size);
@ -360,7 +361,7 @@ int main(int argc, char *argv[])
} }
if (read_it && write_it) { if (read_it && write_it) {
printf("-r and -w are mutually exclusive\n"); printf("Error: -r and -w are mutually exclusive.\n");
usage(argv[0]); usage(argv[0]);
} }
@ -432,7 +433,6 @@ int main(int argc, char *argv[])
flash = flashes[0]; flash = flashes[0];
printf("Flash part is %s (%d KB).\n", flash->name, flash->total_size);
if (TEST_OK_MASK != (flash->tested & TEST_OK_MASK)) { if (TEST_OK_MASK != (flash->tested & TEST_OK_MASK)) {
printf("===\n"); printf("===\n");
if (flash->tested & TEST_BAD_MASK) { if (flash->tested & TEST_BAD_MASK) {
@ -480,7 +480,7 @@ int main(int argc, char *argv[])
buf = (uint8_t *) calloc(size, sizeof(char)); buf = (uint8_t *) calloc(size, sizeof(char));
if (erase_it) { if (erase_it) {
printf("Erasing flash chip\n"); printf("Erasing flash chip.\n");
if (!flash->erase) { if (!flash->erase) {
fprintf(stderr, "Error: flashrom has no erase function for this flash chip.\n"); fprintf(stderr, "Error: flashrom has no erase function for this flash chip.\n");
return 1; return 1;
@ -517,7 +517,7 @@ int main(int argc, char *argv[])
exit(1); exit(1);
} }
if (image_stat.st_size != flash->total_size * 1024) { if (image_stat.st_size != flash->total_size * 1024) {
fprintf(stderr, "Error: Image size doesnt match\n"); fprintf(stderr, "Error: Image size doesn't match\n");
exit(1); exit(1);
} }