- Timestamp:
- 07/26/11 16:28:35 (10 months ago)
- File:
-
- 1 edited
-
trunk/flashrom.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/flashrom.c
r1386 r1392 1472 1472 if (do_something(flash, start, len, param1, param2, 1473 1473 eraser.block_erase)) { 1474 msg_cdbg("\n");1475 1474 return 1; 1476 1475 } … … 1523 1522 1524 1523 for (k = 0; k < NUM_ERASEFUNCTIONS; k++) { 1524 if (k != 0) 1525 msg_cdbg("Looking for another erase function.\n"); 1525 1526 if (!usable_erasefunctions) { 1526 1527 msg_cdbg("No usable erase functions left.\n"); 1527 1528 break; 1528 1529 } 1529 msg_cdbg("Looking at blockwise erase function %i... ", k); 1530 if (check_block_eraser(flash, k, 1)) { 1531 msg_cdbg("Looking for another erase function.\n"); 1530 msg_cdbg("Trying erase function %i... ", k); 1531 if (check_block_eraser(flash, k, 1)) 1532 1532 continue; 1533 }1534 1533 usable_erasefunctions--; 1535 msg_cdbg("trying... "); 1536 ret = walk_eraseregions(flash, k, &erase_and_write_block_helper, curcontents, newcontents); 1537 msg_cdbg("\n"); 1534 ret = walk_eraseregions(flash, k, &erase_and_write_block_helper, 1535 curcontents, newcontents); 1538 1536 /* If everything is OK, don't try another erase function. */ 1539 1537 if (!ret) … … 1545 1543 if (!usable_erasefunctions) 1546 1544 continue; 1545 /* Reading the whole chip may take a while, inform the user even 1546 * in non-verbose mode. 1547 */ 1548 msg_cinfo("Reading current flash chip contents... "); 1547 1549 if (flash->read(flash, curcontents, 0, size)) { 1548 1550 /* Now we are truly screwed. Read failed as well. */ 1549 msg_cerr("Can't read anymore! \n");1551 msg_cerr("Can't read anymore! Aborting.\n"); 1550 1552 /* We have no idea about the flash chip contents, so 1551 1553 * retrying with another erase function is pointless. … … 1553 1555 break; 1554 1556 } 1557 msg_cinfo("done. "); 1555 1558 } 1556 1559 /* Free the scratchpad. */ … … 1560 1563 msg_cerr("FAILED!\n"); 1561 1564 } else { 1562 msg_cinfo(" Done.\n");1565 msg_cinfo("Erase/write done.\n"); 1563 1566 } 1564 1567 return ret; … … 1939 1942 * takes time as well. 1940 1943 */ 1941 msg_c dbg("Reading old flash chip contents... ");1944 msg_cinfo("Reading old flash chip contents... "); 1942 1945 if (flash->read(flash, oldcontents, 0, size)) { 1943 1946 ret = 1; 1944 msg_c dbg("FAILED.\n");1947 msg_cinfo("FAILED.\n"); 1945 1948 goto out; 1946 1949 } 1947 msg_c dbg("done.\n");1950 msg_cinfo("done.\n"); 1948 1951 1949 1952 // This should be moved into each flash part's code to do it
Note: See TracChangeset
for help on using the changeset viewer.
