diff options
author | Sean Nelson <audiohacked@gmail.com> | 2010-03-24 23:14:32 +0000 |
---|---|---|
committer | Sean Nelson <audiohacked@gmail.com> | 2010-03-24 23:14:32 +0000 |
commit | ed479d2a8728dc12f1f78170cacfaf542cd0b44e (patch) | |
tree | 50b12e054fcff9b0cabbf916d2d049d00f2bf8e5 /sst28sf040.c | |
parent | 93539dad8d6c0336f60c50966a2dc3a34736165d (diff) | |
download | flashrom-ed479d2a8728dc12f1f78170cacfaf542cd0b44e.tar.gz flashrom-ed479d2a8728dc12f1f78170cacfaf542cd0b44e.tar.bz2 flashrom-ed479d2a8728dc12f1f78170cacfaf542cd0b44e.zip |
Convert chips' message printing to msg_c* Fixed suggestions by Carl-Daniel
Corresponding to flashrom svn r982.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'sst28sf040.c')
-rw-r--r-- | sst28sf040.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sst28sf040.c b/sst28sf040.c index 0c905260..b9e33ab3 100644 --- a/sst28sf040.c +++ b/sst28sf040.c @@ -63,7 +63,7 @@ int erase_sector_28sf040(struct flashchip *flash, unsigned int address, unsigned toggle_ready_jedec(bios); if (check_erased_range(flash, address, sector_size)) { - fprintf(stderr, "ERASE FAILED!\n"); + msg_cerr("ERASE FAILED!\n"); return -1; } return 0; @@ -105,7 +105,7 @@ int erase_28sf040(struct flashchip *flash) toggle_ready_jedec(bios); if (check_erased_range(flash, 0, flash->total_size * 1024)) { - fprintf(stderr, "ERASE FAILED!\n"); + msg_cerr("ERASE FAILED!\n"); return -1; } return 0; @@ -120,21 +120,21 @@ int write_28sf040(struct flashchip *flash, uint8_t *buf) unprotect_28sf040(bios); - printf("Programming page: "); + msg_cinfo("Programming page: "); for (i = 0; i < total_size / page_size; i++) { /* erase the page before programming */ if (erase_sector_28sf040(flash, i * page_size, page_size)) { - fprintf(stderr, "ERASE FAILED!\n"); + msg_cerr("ERASE FAILED!\n"); return -1; } /* write to the sector */ - printf("%04d at address: 0x%08x", i, i * page_size); + msg_cinfo("%04d at address: 0x%08x", i, i * page_size); write_sector_28sf040(bios, buf + i * page_size, bios + i * page_size, page_size); - printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"); + msg_cinfo("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"); } - printf("\n"); + msg_cinfo("\n"); protect_28sf040(bios); @@ -144,7 +144,7 @@ int write_28sf040(struct flashchip *flash, uint8_t *buf) int erase_chip_28sf040(struct flashchip *flash, unsigned int addr, unsigned int blocklen) { if ((addr != 0) || (blocklen != flash->total_size * 1024)) { - fprintf(stderr, "%s called with incorrect arguments\n", + msg_cerr("%s called with incorrect arguments\n", __func__); return -1; } |