On Fri, Oct 12, 2007 at 11:23:03AM +0200, Peter Stuge wrote:
> On Thu, Oct 11, 2007 at 06:55:05PM +0200, Stefan Reinauer wrote:
> > > - printf("Failed!\n");
> > > + printf("failed!\n");
> >
> > FAILED ? This is usually a pretty nasty situation.
>
> I like FAILED.
>
>
> > > - printf("Failed!\n");
> > > + printf("failed!\n");
> >
> > CAPITALIZE
>
> Yeah.Agreed. Updated patch attached. Uwe. -- http://www.hermann-uwe.de | http://www.holsham-traders.de http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
Some cosmetic cleanups in the flashrom code and output.
Signed-off-by: Uwe Hermann <[EMAIL PROTECTED]>
Index: pm49fl004.c
===================================================================
--- pm49fl004.c (Revision 2849)
+++ pm49fl004.c (Arbeitskopie)
@@ -30,7 +30,7 @@
int page_size = flash->page_size;
volatile uint8_t *bios = flash->virtual_memory;
- printf("Programming Page: ");
+ printf("Programming page: ");
for (i = 0; i < total_size / page_size; i++) {
if ((i >= exclude_start_page) && (i < exclude_end_page))
continue;
Index: w49f002u.c
===================================================================
--- w49f002u.c (Revision 2849)
+++ w49f002u.c (Arbeitskopie)
@@ -30,7 +30,7 @@
erase_chip_jedec(flash);
- printf("Programming Page: ");
+ printf("Programming page: ");
for (i = 0; i < total_size / page_size; i++) {
/* write to the sector */
printf("%04d at address: 0x%08x ", i, i * page_size);
Index: sst39sf020.c
===================================================================
--- sst39sf020.c (Revision 2849)
+++ sst39sf020.c (Arbeitskopie)
@@ -46,7 +46,7 @@
erase_chip_jedec(flash);
- printf("Programming Page: ");
+ printf("Programming page: ");
for (i = 0; i < total_size / page_size; i++) {
/* write to the sector */
printf("%04d at address: 0x%08x", i, i * page_size);
Index: sst28sf040.c
===================================================================
--- sst28sf040.c (Revision 2849)
+++ sst28sf040.c (Arbeitskopie)
@@ -143,7 +143,7 @@
unprotect_28sf040(bios);
- printf("Programming Page: ");
+ printf("Programming page: ");
for (i = 0; i < total_size / page_size; i++) {
/* erase the page before programming */
erase_sector_28sf040(bios, i * page_size);
Index: sst_fwhub.c
===================================================================
--- sst_fwhub.c (Revision 2849)
+++ sst_fwhub.c (Arbeitskopie)
@@ -83,12 +83,12 @@
// dumb check if erase was successful.
for (i = 0; i < total_size; i++) {
if (bios[i] != 0xff) {
- printf("ERASE FAILED\n");
+ printf("ERASE FAILED!\n");
return -1;
}
}
- printf("Programming Page: ");
+ printf("Programming page: ");
for (i = 0; i < total_size / page_size; i++) {
printf("%04d at address: 0x%08x", i, i * page_size);
write_sector_jedec(bios, buf + i * page_size,
Index: chipset_enable.c
===================================================================
--- chipset_enable.c (Revision 2849)
+++ chipset_enable.c (Arbeitskopie)
@@ -499,12 +499,12 @@
}
if (dev) {
- printf("Found chipset \"%s\": Enabling flash write... ",
+ printf("Found chipset \"%s\", enabling flash write... ",
enables[i].name);
ret = enables[i].doit(dev, enables[i].name);
if (ret)
- printf("Failed!\n");
+ printf("FAILED!\n");
else
printf("OK.\n");
}
Index: lbtable.c
===================================================================
--- lbtable.c (Revision 2849)
+++ lbtable.c (Arbeitskopie)
@@ -105,26 +105,26 @@
printf_debug("Found canidate at: %08lx-%08lx\n",
addr, addr + head->table_bytes);
if (head->header_bytes != sizeof(*head)) {
- fprintf(stderr, "Header bytes of %d are incorrect\n",
+ fprintf(stderr, "Header bytes of %d are incorrect.\n",
head->header_bytes);
continue;
}
if (count_lb_records(head) != head->table_entries) {
- fprintf(stderr, "bad record count: %d\n",
+ fprintf(stderr, "Bad record count: %d.\n",
head->table_entries);
continue;
}
if (compute_checksum((uint8_t *) head, sizeof(*head)) != 0) {
- fprintf(stderr, "bad header checksum\n");
+ fprintf(stderr, "Bad header checksum.\n");
continue;
}
if (compute_checksum(recs, head->table_bytes)
!= head->table_checksum) {
- fprintf(stderr, "bad table checksum: %04x\n",
+ fprintf(stderr, "Bad table checksum: %04x.\n",
head->table_checksum);
continue;
}
- fprintf(stdout, "Found LinuxBIOS table at: %08lx\n", addr);
+ fprintf(stdout, "Found LinuxBIOS table at 0x%08lx.\n", addr);
return head;
};
@@ -140,7 +140,7 @@
rec = (struct lb_mainboard *)ptr;
max_size = rec->size - sizeof(*rec);
- printf("vendor id: %.*s part id: %.*s\n",
+ printf("Vendor ID: %.*s, part ID: %.*s\n",
max_size - rec->vendor_idx,
rec->strings + rec->vendor_idx,
max_size - rec->part_number_idx,
@@ -151,7 +151,7 @@
rec->strings + rec->part_number_idx);
if (lb_part) {
- printf("overwritten by command line, vendor id: %s part id: %s\n", lb_vendor, lb_part);
+ printf("Overwritten by command line, vendor ID: %s, part ID: %s.\n", lb_vendor, lb_part);
} else {
lb_part = strdup(part);
lb_vendor = strdup(vendor);
@@ -201,7 +201,7 @@
if (lb_table) {
unsigned long addr;
addr = ((char *)lb_table) - ((char *)low_1MB);
- printf_debug("lb_table found at address %p\n", lb_table);
+ printf_debug("LinuxBIOS table found at %p.\n", lb_table);
rec = (struct lb_record *)(((char *)lb_table) + lb_table->header_bytes);
last = (struct lb_record *)(((char *)rec) + lb_table->table_bytes);
printf_debug("LinuxBIOS header(%d) checksum: %04x table(%d) checksum: %04x entries: %d\n",
Index: jedec.c
===================================================================
--- jedec.c (Revision 2849)
+++ jedec.c (Arbeitskopie)
@@ -281,12 +281,12 @@
// dumb check if erase was successful.
for (i = 0; i < total_size; i++) {
if (bios[i] != (uint8_t) 0xff) {
- printf("ERASE FAILED\n");
+ printf("ERASE FAILED!\n");
return -1;
}
}
- printf("Programming Page: ");
+ printf("Programming page: ");
for (i = 0; i < total_size / page_size; i++) {
printf("%04d at address: 0x%08x", i, i * page_size);
write_page_write_jedec(bios, buf + i * page_size,
Index: flashrom.c
===================================================================
--- flashrom.c (Revision 2849)
+++ flashrom.c (Arbeitskopie)
@@ -143,7 +143,7 @@
flash->virtual_memory = bios;
if (flash->probe(flash) == 1) {
- printf("%s found at physical address: 0x%lx\n",
+ printf("%s found at physical address 0x%lx.\n",
flash->name, flash_baseaddr);
return flash;
}
@@ -161,7 +161,7 @@
int total_size = flash->total_size * 1024;
volatile uint8_t *bios = flash->virtual_memory;
- printf("Verifying flash ");
+ printf("Verifying flash... ");
if (verbose)
printf("address: 0x00000000\b\b\b\b\b\b\b\b\b\b");
@@ -174,7 +174,7 @@
if (verbose) {
printf("0x%08x ", idx);
}
- printf("- FAILED\n");
+ printf("FAILED!\n");
return 1;
}
@@ -184,7 +184,7 @@
if (verbose)
printf("\b\b\b\b\b\b\b\b\b\b ");
- printf("- VERIFIED \n");
+ printf("VERIFIED. \n");
return 0;
}
@@ -369,7 +369,7 @@
exit(1);
}
- printf("Flash part is %s (%d KB)\n", flash->name, flash->total_size);
+ printf("Flash part is %s (%d KB).\n", flash->name, flash->total_size);
if (!(read_it | write_it | verify_it | erase_it)) {
printf("No operations were specified.\n");
Index: layout.c
===================================================================
--- layout.c (Revision 2849)
+++ layout.c (Arbeitskopie)
@@ -47,14 +47,14 @@
}
printf_debug("LinuxBIOS last image size "
- "(not rom size) is %d bytes.\n", *walk);
+ "(not ROM size) is %d bytes.\n", *walk);
walk--;
mainboard_part = strdup((const char *)(bios + size - *walk));
walk--;
mainboard_vendor = strdup((const char *)(bios + size - *walk));
- printf_debug("MANUFACTURER: %s\n", mainboard_vendor);
- printf_debug("MAINBOARD ID: %s\n", mainboard_part);
+ printf_debug("Manufacturer: %s\n", mainboard_vendor);
+ printf_debug("Mainboard ID: %s\n", mainboard_part);
/*
* If lb_vendor is not set, the linuxbios table was
@@ -63,7 +63,7 @@
if (!lb_vendor || !lb_part) {
printf("Note: If the following flash access fails, "
- "you might need to specify -m <vendor>:<mainboard>\n");
+ "you might need to specify -m <vendor>:<mainboard>.\n");
return 0;
}
@@ -104,7 +104,7 @@
romlayout = fopen(name, "r");
if (!romlayout) {
- fprintf(stderr, "ERROR: Could not open rom layout (%s).\n",
+ fprintf(stderr, "ERROR: Could not open ROM layout (%s).\n",
name);
return -1;
}
@@ -154,8 +154,7 @@
return i;
}
}
- printf("not found.\n");
- // Not found. Error.
+ printf("not found.\n"); // Not found. Error.
return -1;
}
Index: msys_doc.c
===================================================================
--- msys_doc.c (Revision 2849)
+++ msys_doc.c (Arbeitskopie)
@@ -169,10 +169,10 @@
return (1);
erase_md2802(flash);
if (*bios != (uint8_t) 0xff) {
- printf("ERASE FAILED\n");
+ printf("ERASE FAILED!\n");
return -1;
}
- printf("Programming Page: ");
+ printf("Programming page: ");
for (i = 0; i < total_size / page_size; i++) {
printf("%04d at address: 0x%08x", i, i * page_size);
//write_page_md2802(bios, buf + i * page_size, bios + i * page_size, page_size);
Index: sst49lfxxxc.c
===================================================================
--- sst49lfxxxc.c (Revision 2849)
+++ sst49lfxxxc.c (Arbeitskopie)
@@ -170,7 +170,7 @@
volatile uint8_t *bios = flash->virtual_memory;
write_lockbits_49lfxxxc(flash->virtual_registers, total_size, 0);
- printf("Programming Page: ");
+ printf("Programming page: ");
for (i = 0; i < total_size / page_size; i++) {
/* erase the page before programming */
erase_sector_49lfxxxc(bios, i * page_size);
Index: udelay.c
===================================================================
--- udelay.c (Revision 2849)
+++ udelay.c (Arbeitskopie)
@@ -56,5 +56,5 @@
micro = count / timeusec;
printf_debug("%ldM loops per second. ", (unsigned long)micro);
- printf("ok\n");
+ printf("OK.\n");
}
Index: 82802ab.c
===================================================================
--- 82802ab.c (Revision 2849)
+++ 82802ab.c (Arbeitskopie)
@@ -172,7 +172,7 @@
printf("ERASE FAILED\n");
return -1;
}
- printf("Programming Page: ");
+ printf("Programming page: ");
for (i = 0; i < total_size / page_size; i++) {
printf("%04d at address: 0x%08x", i, i * page_size);
write_page_82802ab(bios, buf + i * page_size,
Index: m29f400bt.c
===================================================================
--- m29f400bt.c (Revision 2849)
+++ m29f400bt.c (Arbeitskopie)
@@ -124,7 +124,7 @@
volatile uint8_t *bios = flash->virtual_memory;
//erase_m29f400bt (flash);
- printf("Programming Page:\n ");
+ printf("Programming page:\n ");
/*********************************
*Pages for M29F400BT:
* 16 0x7c000 0x7ffff TOP
@@ -175,7 +175,7 @@
{
volatile uint8_t *bios = flash->virtual_memory;
- printf("Programming Page:\n ");
+ printf("Programming page:\n ");
/*********************************
*Pages for M29F400BT:
* 16 0x7c000 0x7ffff TOP
Index: mx29f002.c
===================================================================
--- mx29f002.c (Revision 2849)
+++ mx29f002.c (Arbeitskopie)
@@ -88,7 +88,7 @@
erase_29f002(flash);
//*bios = 0xF0;
#if 1
- printf("Programming Page: ");
+ printf("Programming page: ");
for (i = 0; i < total_size; i++) {
/* write to the sector */
if ((i & 0xfff) == 0)
Index: sharplhf00l04.c
===================================================================
--- sharplhf00l04.c (Revision 2849)
+++ sharplhf00l04.c (Arbeitskopie)
@@ -164,10 +164,10 @@
erase_lhf00l04(flash);
if (*bios != 0xff) {
- printf("ERASE FAILED\n");
+ printf("ERASE FAILED!\n");
return -1;
}
- printf("Programming Page: ");
+ printf("Programming page: ");
for (i = 0; i < total_size / page_size; i++) {
printf("%04d at address: 0x%08x", i, i * page_size);
write_page_lhf00l04(bios, buf + i * page_size,
Index: sst49lf040.c
===================================================================
--- sst49lf040.c (Revision 2849)
+++ sst49lf040.c (Arbeitskopie)
@@ -44,7 +44,7 @@
int page_size = flash->page_size;
volatile uint8_t *bios = flash->virtual_memory;
- printf("Programming Page: ");
+ printf("Programming page: ");
for (i = 0; i < total_size / page_size; i++) {
/* erase the page before programming
* Chip erase only works in parallel programming mode
Index: board_enable.c
===================================================================
--- board_enable.c (Revision 2849)
+++ board_enable.c (Arbeitskopie)
@@ -118,7 +118,7 @@
busy = inb(port) & 0x80;
} while (busy);
if (readcnt > 3) {
- printf("%s called with unsupported readcnt %i\n",
+ printf("%s called with unsupported readcnt %i.\n",
__FUNCTION__, readcnt);
return 1;
}
@@ -148,7 +148,7 @@
writeenc = 0x3;
break;
default:
- printf("%s called with unsupported writecnt %i\n",
+ printf("%s called with unsupported writecnt %i.\n",
__FUNCTION__, writecnt);
return 1;
}
@@ -170,7 +170,7 @@
if (it8716f_spi_command(port, JEDEC_RDID_OUTSIZE, JEDEC_RDID_INSIZE, cmd, readarr))
return 1;
- printf("RDID returned %02x %02x %02x\n", readarr[0], readarr[1], readarr[2]);
+ printf("RDID returned %02x %02x %02x.\n", readarr[0], readarr[1], readarr[2]);
return 0;
}
@@ -291,7 +291,7 @@
dev = pci_dev_find(0x1106, 0x3177); /* VT8235 ISA bridge */
if (!dev) {
- fprintf(stderr, "\nERROR: VT8235 ISA Bridge not found.\n");
+ fprintf(stderr, "\nERROR: VT8235 ISA bridge not found.\n");
return -1;
}
@@ -485,7 +485,7 @@
struct board_pciid_enable board_pciid_enables[] = {
{0x10de, 0x0360, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- "gigabyte", "m57sli", "GIGABYTE GA-M57SLI", it87xx_probe_serial_flash},
+ "gigabyte", "m57sli", "GIGABYTE GA-M57SLI-S4", it87xx_probe_serial_flash},
{0x1022, 0x7468, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
"iwill", "dk8_htx", "IWILL DK8-HTX", w83627hf_gpio24_raise},
{0x1022, 0x746B, 0x1022, 0x36C0, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -581,12 +581,12 @@
board = board_match_pci_card_ids();
if (board) {
- printf("Found board \"%s\": Enabling flash write... ",
+ printf("Found board \"%s\", enabling flash write... ",
board->name);
ret = board->enable(board->name);
if (ret)
- printf("Failed!\n");
+ printf("FAILED!\n");
else
printf("OK.\n");
}
signature.asc
Description: Digital signature
-- linuxbios mailing list [email protected] http://www.linuxbios.org/mailman/listinfo/linuxbios
