summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2012-05-14 22:54:58 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2012-05-14 22:54:58 +0000
commit901a3ba023fd64e29309637f5ad835218e1bb2ac (patch)
treed0f024b5f8820e6bfdba5d599c607859e2f15a0d /flashrom.c
parent2cef9164ef1e35e4d1f347ff58722104e8143454 (diff)
downloadast2050-flashrom-901a3ba023fd64e29309637f5ad835218e1bb2ac.zip
ast2050-flashrom-901a3ba023fd64e29309637f5ad835218e1bb2ac.tar.gz
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>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/flashrom.c b/flashrom.c
index a54348d..ec8137b 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -40,7 +40,7 @@
const char flashrom_version[] = FLASHROM_VERSION;
char *chip_to_probe = NULL;
-int verbose = 0;
+int verbose = MSG_INFO;
static enum programmer programmer = PROGRAMMER_INVALID;
@@ -1457,27 +1457,27 @@ void list_programmers_linebreak(int startcol, int cols, int paren)
if (firstline)
firstline = 0;
else
- printf("\n");
+ msg_ginfo("\n");
for (i = 0; i < startcol; i++)
- printf(" ");
+ msg_ginfo(" ");
remaining = cols - startcol;
} else {
- printf(" ");
+ msg_ginfo(" ");
remaining--;
}
if (paren && (p == 0)) {
- printf("(");
+ msg_ginfo("(");
remaining--;
}
- printf("%s", pname);
+ msg_ginfo("%s", pname);
remaining -= pnamelen;
if (p < PROGRAMMER_INVALID - 1) {
- printf(",");
+ msg_ginfo(",");
remaining--;
} else {
if (paren)
- printf(")");
- printf("\n");
+ msg_ginfo(")");
+ msg_ginfo("\n");
}
}
}
OpenPOWER on IntegriCloud