1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-26 22:52:34 +02:00

19 Commits

Author SHA1 Message Date
Anastasia Klimchuk
e2df58a379 libflashrom: Update the API for progress callback
The initial version of API for progress callback would require the
callback function to make a second call to get the needed data about
progress state (current, total etc).

This patch changes the callback API, so that callback function gets
all needed data straight away as parameters, and with this,
callback has all the data to do its job.

Since the initial version was submitted and it was in the tree for a
while, the change needs to add a _v2 suffix for new thing and
deprecated attribute for old thing.

Testing: both unit tests and cli are libflashrom clients.
All unit tests run successfully, for the cli all scenarios from
commit 75dc0655b95dde91f1426a7e5aecfc04d7b8d631 run successfully.

Change-Id: Ia8cc0461c449b7e65888a64cdc594c55b81eae7a
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/86031
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
2025-03-09 07:34:06 +00:00
Antonio Vázquez Blanco
b792b44e14 Extract cli_output declarations to a separate header.
This is a simple refactor that aims to simplify maintenance and to
clarify file dependency inside the project.
Currently, many declarations reside in flash.h making it difficult to
really understand file dependency.

Change-Id: I4209d5ed205ca14c39e83aa923e103b7282a7059
Signed-off-by: Antonio Vázquez Blanco <antoniovazquezblanco@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/85134
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2024-12-06 06:30:09 +00:00
Anastasia Klimchuk
75dc0655b9 Complete and fix progress feature implementation for all operations
Original progress reporting implemented in CB:49643 and it has some
issues, for example:

    size_t start_address = start;
    size_t end_address = len - start;

End address is anything but length minus start address.

    update_progress(flash,
                    FLASHROM_PROGRESS_READ,
                    /*current*/ start - start_address + to_read,
                    /*total*/ end_address);

Total should just be length if that's how current value is computed.

---

libflashrom needs to know total size ahead of time.
That's init_progress() and changed update_progress().

It also needs to store the last current value to be able to update it.
That's stage_progress in flashrom_flashctx.

Measuring accurately amount of data which will be read/erased/written
isn't easy because things can be skipped as optimizations. The next
patch in the chain aims to address this, there are TODO/FIXME
comments there.

---

CLI shares terminal with the rest of the code and has to maintain more
state to handle that reasonably well.

Similar to CB:64668, an effort is made to keep the progress on a
single line. Non-progress output is kept track of to know when
moving to a new line cannot be avoided.

---

A script to test the CLI:

\#!/bin/bash
t=${1:-rewW}
shift

if [[ $t =~ r ]]; then
    echo ">>> READ"
    ./flashrom -p dummy:emulate=W25Q128FV,freq=64mhz -r dump.rom --progress "$@"
    echo
fi

if [[ $t =~ e ]]; then
    echo ">>> ERASE"
    ./flashrom -p dummy:emulate=W25Q128FV,freq=64mhz -E --progress "$@"
    echo
fi

if [[ $t =~ w ]]; then
    echo ">>> WRITE (without erase)"
    dd if=/dev/zero of=zero.rom bs=1M count=16 2> /dev/null
    ./flashrom -p dummy:emulate=W25Q128FV,freq=64mhz -w zero.rom --progress "$@"
    echo
fi

if [[ $t =~ W ]]; then
    echo ">>> WRITE (with erase)"
    dd if=/dev/zero of=zero.rom bs=1M count=16 2> /dev/null
    dd if=/dev/random of=random.rom bs=1M count=16 2> /dev/null
    ./flashrom -p dummy:emulate=W25Q128FV,freq=64mhz,image=random.rom -w zero.rom --progress "$@"
    echo
fi

Co-developed-by: Anastasia Klimchuk <aklm@flashrom.org>
Co-developed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Change-Id: If1e40fc97f443c4f0c0501cef11cff1f3f84c051
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/84102
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2024-10-27 06:13:11 +00:00
Richard Hughes
40892b0c08 libflashrom: Return progress state to the library user
Projects using libflashrom like fwupd expect the user to wait for the
operation to complete. To avoid the user thinking the process has
"hung" or "got stuck" report back the progress complete of the erase,
write and read operations.

Add a new --progress flag to the CLI to report progress of operations.

Include a test for the dummy spi25 device.

TEST=./test_build.sh; ./flashrom -p lspcon_i2c_spi:bus=7 -r /dev/null --progress

Change-Id: I7197572bb7f19e3bdb2bde855d70a0f50fd3854c
Signed-off-by: Richard Hughes <richard@hughsie.com>
Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/49643
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
2022-05-25 08:08:13 +00:00
Thomas Heijligen
50cd432c74 Drop STANDALONE mode
STANDALONE mode was used to build flashrom without having support for
file handling. This was relevant to build libflashrom on top of
libpayload. For a while now, the code which is covered by STANDALONE has
moved to cli_*.c and is not used for libflashrom. Therefore we can drop
STANDALONE mode.

Change-Id: I58fb82270a9884a323d9850176708d230fdc5165
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/63469
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-04-13 11:45:56 +00:00
Elyes HAOUAS
e083880279 Remove address from GPLv2 headers
Change-Id: I7bfc339673cbf5ee2d2ff7564c4db04ca088d0a4
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/25381
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-04-24 20:21:41 +00:00
Nico Huber
d152fb95e2 Drop redundant enum msglevel
Use `enum flashrom_log_level` instead to avoid further confusion.

Change-Id: I1895cb8f60da3abf70c9c2953f52414cd2cc10a9
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20268
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-13 16:27:55 +00:00
Nico Huber
1878110848 Adapt CLI to use new libflashrom interface' print callback
This renames CLI's print() to flashrom_print_cb() and registers it
through the new libflashrom interface.

v2: Add libflashrom.o to LIB_OBJS now that everything can be linked
    together.

Change-Id: Idf19978eb8e340d258199193d2978f37409e9983
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/17948
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2017-06-03 20:15:56 +02:00
Stefan Tauner
9b32de94f5 Refactor some CLI-relevant parts
Begin to move functions that clearly belong to the (command line)
user interface out of flashrom's core files like flashrom.c.

 - Refine messages within check_chip_supported(), rename it to
   print_chip_support_status() and move it to newly created cli_common.c.
 - Move flashbuses_to_text() to cli_common.c as well.
 - Move global verbosity variables to cli_output.c.

Corresponding to flashrom svn r1841.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2014-08-08 23:52:33 +00:00
Stefan Tauner
c2eec2c920 Add a bunch of new/tested stuff and various small changes 20
Tested mainboards:
OK:
 - abit BX6 2.0
   Reported by Stefan Tauner
 - Acer EM61SM/EM61PM (used in Acer Aspire T180)
   Reported by Benjamin Bellec
 - ADLINK Express-HR
   Reported by Obermair Thomas
 - ASUS M3N-H/HDMI
   Reported by Franc Serres
 - Attro G5G100-P
   Reported by Christoph Grenz
 - ASRock 960GM-GS3 FX
   Reported by Fuley Istvan
 - Elitegroup P6BAP-A+ (V2.2)
   Reported by Arnaldo Pirrone
 - Elitegroup GeForce7050M-M (V2.0)
   Reported by Leif Middelschulte
 - Fujitsu D3041-A1 (used in ESPRIMO P2560)
   Reported by Daggi Duck
 - GIGABYTE GA-8S648
   Reported by TeslaBIOS
 - GIGABYTE GA-970A-D3P (rev. 1.0)
   Reported by Jean-Francois Pirus
 - GIGABYTE GA-B85M-D3H
   Reported by Mladen Milinković
 - GIGABYTE GA-X79-UD3
   Reported by Jeff O'Neil
 - GIGABYTE GA-X79-UP4 (rev. 1.0)
   Reported by George Spelvin
 - GIGABYTE GA-Z68MA-D2H-B3 (rev. 1.3)
   Reported by Vangelis Skarmoutsos
 - GIGABYTE GA-Z87-HD3
   Reported by virii5
 - Lenovo Tilapia CRB
   Reported by jenkins56 on IRC
 - MSI GT60-2OD (notebook, only with layout patches)
   Reported by Vasiliy Vylegzhanin
 - MSI MS-6704 (845PE Max2 PCB 1.0) (Pure Version w/o raid)
   Reported by professorll
 - MSI MS-7399 1.1 (used in Acer Aspire M5640/M3640)
   Reported by Koen Rousseau
 - MSI MS-7125 (K8N Neo4(-F/FI/FX))
   We had a board enable for that one for years, but it was not (and still is not)
   completely clear which boards are covered.
 - MSI MS-7522 (MSI X58 Pro-E)
   Reported by Gianluigi Tiesi
 - PCWARE APM80-D3
   Reported by César Augusto Jakoby
 - Pegatron IPP7A-CP
   Reported by Илья Шипко
 - Supermicro H8QME-2
   Reported by Greg Tippitt
 - Supermicro X7SPA-H
   Reported by Kyle Bentley
 - Supermicro X7SPE-HF-D525
   Reported by Micah Anderson
 - Supermicro X8DTE
   Reported by Mark Nipper
 - Supermicro X8SIL-F
   Reported by Peter Samuelson
 - ZOTAC IONITX-A (-E) version
   Reported by Maciej Wroniecki
NOT OK:
 - Supermicro X10SLM-F
   Reported by Micah Anderson

Flash chips:
 - Atmel AT29C020 to PREW (+PREW)
   It was marked like that in the past, but I could not find the reason why the
   test bits were reset. Urja Rannikko tested it again and it still works.
 - Eon EN25F10 to PREW (+PREW)
   Reported by Stolmár Tamás
 - Eon EN25QH64 to PR (+PR)
   Reported by Vladimir 'φ-coder' Serbinenko
 - GigaDevice GD25Q32(B) to PREW (+PREW)
   Reported by mrnuke
 - Macronix MX25L512(E)/MX25V512(C) to PREW (+PREW)
   Reported by Jamie Nichol
 - Macronix MX25L2005(C) to PREW (+PREW)
   Reported by Давыдов Дмитрий
 - Micron/Numonyx/ST N25Q064..1E to PREW (+PREW)
   Reported by Paolo Zambotti
 - Pmc Pm25LD010(C) to PREW (+PREW)
   Reported by Vasile Ceteras
 - Micron/Numonyx/ST M25P16 to PREW (+EW)
   Reported by raven
 - Micron/Numonyx/ST M25PX64 to PREW (+W)
   Reported by Zaolin
 - SST SST25VF020B to PREW (+PREW)
   Reported by Michaël Zweers
 - SST SST49LF040 to PREW (+W)
   Reported by Oskar Enoksson
 - Add support for MX25L3273E (evil twin of MX25L3205 et al.)
   Also, add MX25L1673 and MX25L6473E to the names of their twins and
   add a note about MX25L8073E.
 - Winbond W25X32 to PREW (+REW)
   Reported by The Raven
 - Winbond W29C010 etc. to PREW (+W)
   Reported by san

Chipsets tested OK:
 - Intel NM70 (8086:1e5f)
   Reported by mrnuke
 - Intel C204 (8086:1c54)
   Reported by Vasiliy Vylegzhanin
 - Intel QM67 (8086:1c4f)
   Reported by Obermair Thomas
 - Intel HM77 (8086:1e57)
   Reported by Vasiliy Vylegzhanin
 - Intel B85 (8086:8c50)
   Reported by Mladen Milinković
 - Intel HM87 (8086:8c4b)
   Reported by Vasiliy Vylegzhanin
 - Intel Z87 (8086:8c44)
   Reported by virii5
 - NVIDIA MCP51 (10de:0261)
   Reported by Marcin Kościelnicki
 - SiS 648 (1039:0648)
   Reported by TeslaBIOS

Miscellaneous:
 - Mark ARM-USB-TINY-H as tested in ft2232_spi (reported by _nanodev_).
 - getrevision.sh: Ignore failing date calls.
 - getrevision.sh: Fix -u and -l for older git versions which require = for the
   git log grep parameter.
 - Corrected K8T Neo2-F entries due to a report from Stelios Tsampas.
 - Add "-p internal" to output that requests users to send flashrom -V logs.
 - Add Macbook2,1, Thinkpad X230, EasyNote LM85 to laptop whitelist.
 - Tiny other stuff.

Corresponding to flashrom svn r1783.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-05-03 21:33:01 +00:00
Stefan Tauner
0554ca5cd3 Add a bunch of new/tested stuff and various small changes 18
Tested mainboards:
OK:
 - ASUS C60M1-I
   http://www.flashrom.org/pipermail/flashrom/2013-February/010578.html
 - ASUS P8H77-I
   http://www.flashrom.org/pipermail/flashrom/2013-March/010607.html
 - ASUS P8H77-M
   http://www.flashrom.org/pipermail/flashrom/2013-May/010994.html
 - ASUS P8P67 LE (B2)
   http://www.flashrom.org/pipermail/flashrom/2013-May/010972.html
 - Elitegroup GeForce6100PM-M2 (V3.0)
   http://www.flashrom.org/pipermail/flashrom/2013-July/011177.html
 - GIGABYTE GA-P55A-UD7
   http://www.flashrom.org/pipermail/flashrom/2013-July/011302.html
 - MSI B75MA-E33 (MS-7808)
   http://www.flashrom.org/pipermail/flashrom/2013-March/010659.html
 - MSI H77MA-G43 (MS-7756)
   http://www.flashrom.org/pipermail/flashrom/2013-April/010853.html
 - MSI KA780G (MS-7551)
   http://paste.flashrom.org/view.php?id=1617
 - SAPPHIRE IPC-E350M1
   Reported by xvilka on IRC
 - Supermicro X8DTG-D
   http://www.flashrom.org/pipermail/flashrom/2013-July/011305.html
NOT OK:
 - ASRock Fatal1ty Z77 Performance
   http://www.flashrom.org/pipermail/flashrom/2013-January/010467.html
 - ASRock Z68 Extreme4
   http://www.flashrom.org/pipermail/flashrom/2013-May/010984.html
 - ASUS P8B75-M LE
   http://www.flashrom.org/pipermail/flashrom/2013-April/010867.html
 - ASUS P8P67-M PRO
   http://www.flashrom.org/pipermail/flashrom/2013-February/010541.html
 - ASUS P8Z68-V LE
   http://www.flashrom.org/pipermail/flashrom/2013-February/010582.html
 - Intel DQ77MK
   http://paste.flashrom.org/view.php?id=1603
 - Supermicro X9DRD-7LN4F
   http://paste.flashrom.org/view.php?id=1582
 - Supermicro X9SCE-F
   http://www.flashrom.org/pipermail/flashrom/2013-February/010588.html
 - Supermicro X9SCM-F
   http://www.flashrom.org/pipermail/flashrom/2013-February/010527.html
 - Tyan S7066
   http://www.flashrom.org/pipermail/flashrom/2013-March/010630.html

Chipsets:
 - Marked Intel B75 as tested
   http://www.flashrom.org/pipermail/flashrom/2013-March/010659.html
 - Marked Intel H77 as tested
   http://www.flashrom.org/pipermail/flashrom/2013-March/010607.html
 - Removed 10de:03e2 because it is apparently the MCP61 host bridge.
   It was reclassified to Host Bridge in the PCI device ID database and there
   is at least one report suggesting this configuration too:
   http://www.flashrom.org/pipermail/flashrom/2012-August/009716.html
 - Added MCP89 which hopefully works with the code for previous versions.
   Thanks to James Laird for submitting this change.

Tested flash chips:
 - Atmel AT25DF641(A) to PREW (+PREW)
   http://www.flashrom.org/pipermail/flashrom/2013-June/011113.html
 - Atmel AT25F512 to PREW (+PREW)
   http://www.flashrom.org/pipermail/flashrom/2013-April/010904.html
   Also, change its ID according to Modification of PCN SC040401A:
   "There has been a change in the returned value of the Product Identification
   (RDID) command, the AT25F512A RDID code is 65h compared to 60h from
   the AT25F512 product."
   It seems to be quite likely that all AT25F512 are fully functional relabeled
   AT25F1024 chips. There are even some hints in the datasheet:
   in table 6 they stress that address pin 16 needs to be low under all circum-
   stances; while continuous reads can wrap around on the AT25F1024 the DS
   notes "For the AT25F512, the read command must be terminated when the
   highest address (00FFFF) is reached." OTOH the lock bit semantics are
   different, but this has not been tested thoroughly
 - Atmel AT25F512A to PREW (+PREW)
   http://paste.flashrom.org/view.php?id=1569
 - Eon EN25F05 to PREW (+PREW)
   http://paste.flashrom.org/view.php?id=1571
 - Macronix MX25L12805(D) to PREW (+REW)
   http://www.flashrom.org/pipermail/flashrom/2013-April/010913.html
 - Spansion S25FL256S......0 and S25FL512S to P/!R!E!W (+P)
   Tested by Stefan Tauner
 - Micron/Numonyx/ST M25PX80 to PREW (+PREW)
   Tested by Stefan Tauner
 - Micron/Numonyx/ST N25Q032..3E and N25Q128..3E to PREW (+PREW)
   Tested by Stefan Tauner
 - Micron/Numonyx/ST N25Q256..3E and N25Q512..3G to P/!R!E!W (+P)
   Tested by Stefan Tauner
 - SST SST25VF040B to PREW (+PREW)
   http://paste.flashrom.org/view.php?id=1574
 - SST SST25VF040B.REMS to PREW (+EW)
   http://paste.flashrom.org/view.php?id=1575
 - ST M25P05-A to PREW (+PREW)
   http://paste.flashrom.org/view.php?id=1576
 - ST M29W512B to PREW (+W)
   http://www.flashrom.org/pipermail/flashrom/2013-March/010635.html
 - Winbond W25Q64.W to PREW (+PREW)
   Tested by the chromiumos guys.
 - Winbond W25Q128.V to PREW (+REW)
   http://www.flashrom.org/pipermail/flashrom/2013-June/011108.html
 - Winbond W25X20 to PREW (+PREW)
   http://www.flashrom.org/pipermail/flashrom/2013-May/010990.html

Miscellaneous:
 - Add Lenovo X201 to the laptop whitelist.
 - Add chip IDs for the ESMT F25L..QA family.
 - Add chip IDs for a few Macronix MX25 models.
 - The list of flashchips is not sorted strictly alphabetically and should not be
   either. Refine the comment explaining the scheme on top of the list.
 - Support -L output of chip sizes with up to 6 decimal places (up to 4 Gb).
 - Use z length modifier in (more) prints for size_t types.
 - Remove chips >16MB again because our current implementation of memory mapping
   the flash chip violates common rules by mapping a window as large as the chip.
   This leads to failing mmaps as can be seen here:
   http://paste.flashrom.org/view.php?id=1695
 - Document spispeed parameter of linux_spi (and fix some leaks).
 - Rephrase the "multiple chips detected" message because it was confusing.
 - Skip verification step if the image is equal to the flash contents.
 - Tiny other stuff.

Corresponding to flashrom svn r1702.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2013-07-25 22:54:25 +00:00
Stefan Tauner
363fd7e827 Get rid of perror()
It prints to stderr and that's not what we want necesserily;
using msg_*err gives us more control.

Corresponding to flashrom svn r1668.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2013-04-07 13:08:30 +00:00
Stefan Tauner
c6fa32d2b5 Introduce msg_*warn
Also, unify all outputs of "Warning:" and "Error:" to use normal
capitalization instead of mixing it with all capitals.

Corresponding to flashrom svn r1643.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
2013-01-04 22:54:07 +00:00
Carl-Daniel Hailfinger
1c15548888 Add logfile support
Usage: flashrom --output logfile.txt

Logfile output has at least dbg2 verbosity or screen verbosity,
whichever is greater.

Corresponding to flashrom svn r1540.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested on Linux, Windows and FreeBSD.
Acked-by: Idwer Vollering <vidwer@gmail.com>
2012-06-06 09:17:06 +00:00
Carl-Daniel Hailfinger
901a3ba023 Convert printf to msg_* where appropriate
Clean up cli_output.c to be more readable.
Use enum instead of #define for message levels.
Kill a few exit(0) calls.
Print the command line arguments in verbose mode.
Move actions (--list-supported etc.) after argument sanity checks.
Reduce the number of code paths which have their own
programmer_shutdown().

Corresponding to flashrom svn r1536.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2012-05-14 22:54:58 +00:00
Stefan Tauner
eebeb53d65 Introduce msg_*dbg2
Corresponding to flashrom svn r1404.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2011-08-04 17:40:25 +00:00
Ed Swierk
7c612f9fb7 Flush stdout after each message
Currently messages like "Writing flash chip..." that don't end with
a newline are buffered until the operation is complete, unless the
particular write function generates status output in the meantime.

Flushing stdout after each message ensures that the message appears
immediately.

Corresponding to flashrom svn r1349.

Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2011-06-19 17:27:57 +00:00
Uwe Hermann
439597032e Various coding style and cosmetic changes
- Fix coding-style, whitespace, and indentation in a few places.

 - Consistently use the same spelling ("Super I/O") everywhere.

Corresponding to flashrom svn r933.

 - Make some flashrom stdout output look a bit nicer.
 
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2010-03-13 17:28:29 +00:00
Sean Nelson
74aa772129 Converting fprintf(stderr), printf, and printf_debug into a common print interface for flashrom
It also changes so -VV will spit out highly verbose messages for
debugging. This is a minimal patch to lessen impact a later patch will
convert current printf messages to the new interface.

Add file that was suppose to be committed with r835.

Corresponding to flashrom svn r836.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-01-07 20:21:58 +00:00