diff options
author | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2013-01-04 22:54:07 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2013-01-04 22:54:07 +0000 |
commit | c6fa32d2b5c08d2fcc92fee2974a3fc02a3ca1f7 (patch) | |
tree | 7ac561c734007cfe88577cdad895f87524e3184f /serprog.c | |
parent | 5561955b1158e8bd29299735abef1e26a5a9cdbc (diff) | |
download | flashrom-c6fa32d2b5c08d2fcc92fee2974a3fc02a3ca1f7.tar.gz flashrom-c6fa32d2b5c08d2fcc92fee2974a3fc02a3ca1f7.tar.bz2 flashrom-c6fa32d2b5c08d2fcc92fee2974a3fc02a3ca1f7.zip |
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>
Diffstat (limited to 'serprog.c')
-rw-r--r-- | serprog.c | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -467,7 +467,7 @@ int serprog_init(void) * in a single byte. */ if (sp_docommand(S_CMD_Q_BUSTYPE, 0, NULL, 1, &c)) { - msg_perr("Warning: NAK to query supported buses\n"); + msg_pwarn("Warning: NAK to query supported buses\n"); c = BUS_NONSPI; /* A reasonable default for now. */ } serprog_buses_supported = c; @@ -547,9 +547,8 @@ int serprog_init(void) buf[3] = (f_spi_req >> (3 * 8)) & 0xFF; if (sp_check_commandavail(S_CMD_S_SPI_FREQ) == 0) - msg_perr(MSGHEADER "Warning: Setting the SPI clock rate is not supported!\n"); - else if (sp_docommand(S_CMD_S_SPI_FREQ, 4, buf, 4, buf) - == 0) { + msg_pwarn(MSGHEADER "Warning: Setting the SPI clock rate is not supported!\n"); + else if (sp_docommand(S_CMD_S_SPI_FREQ, 4, buf, 4, buf) == 0) { f_spi = buf[0]; f_spi |= buf[1] << (1 * 8); f_spi |= buf[2] << (2 * 8); @@ -557,7 +556,7 @@ int serprog_init(void) msg_pdbg(MSGHEADER "Requested to set SPI clock frequency to %u Hz. " "It was actually set to %u Hz\n", f_spi_req, f_spi); } else - msg_pdbg(MSGHEADER "Setting SPI clock rate to %u Hz failed!\n", f_spi_req); + msg_pwarn(MSGHEADER "Setting SPI clock rate to %u Hz failed!\n", f_spi_req); } free(spispeed); bt = serprog_buses_supported; @@ -633,14 +632,14 @@ int serprog_init(void) } if (sp_docommand(S_CMD_Q_PGMNAME, 0, NULL, 16, pgmname)) { - msg_perr("Warning: NAK to query programmer name\n"); + msg_pwarn("Warning: NAK to query programmer name\n"); strcpy((char *)pgmname, "(unknown)"); } pgmname[16] = 0; msg_pinfo(MSGHEADER "Programmer name is \"%s\"\n", pgmname); if (sp_docommand(S_CMD_Q_SERBUF, 0, NULL, 2, &sp_device_serbuf_size)) { - msg_perr("Warning: NAK to query serial buffer size\n"); + msg_pwarn("Warning: NAK to query serial buffer size\n"); } msg_pdbg(MSGHEADER "Serial buffer size is %d\n", sp_device_serbuf_size); @@ -660,8 +659,7 @@ int serprog_init(void) if (sp_docommand(S_CMD_Q_OPBUF, 0, NULL, 2, &sp_device_opbuf_size)) { - msg_perr("Warning: NAK to query operation buffer " - "size\n"); + msg_pwarn("Warning: NAK to query operation buffer size\n"); } msg_pdbg(MSGHEADER "operation buffer size is %d\n", sp_device_opbuf_size); @@ -755,7 +753,7 @@ static int serprog_shutdown(void *data) if (sp_docommand(S_CMD_S_PIN_STATE, 1, &dis, 0, NULL) == 0) msg_pdbg(MSGHEADER "Output drivers disabled\n"); else - msg_perr(MSGHEADER "%s: Warning: could not disable output buffers\n", __func__); + msg_pwarn(MSGHEADER "%s: Warning: could not disable output buffers\n", __func__); } /* FIXME: fix sockets on windows(?), especially closing */ serialport_shutdown(&sp_fd); |