path: root/flash.h
diff options
authorStefan Tauner <>2014-08-08 23:52:33 +0000
committerStefan Tauner <>2014-08-08 23:52:33 +0000
commit9b32de94f5104cb7fa12816b7fa561b804df6ed8 (patch)
tree9501e463b76abf831d62bfd1a9a9ac2f8939476e /flash.h
parenta8cf3620a42ca5927253822a813e3fbae1d6e7bf (diff)
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 <> Acked-by: Carl-Daniel Hailfinger <>
Diffstat (limited to 'flash.h')
1 files changed, 6 insertions, 3 deletions
diff --git a/flash.h b/flash.h
index 8271da9..301eb7a 100644
--- a/flash.h
+++ b/flash.h
@@ -238,7 +238,6 @@ uint32_t chip_readl(const struct flashctx *flash, const chipaddr addr);
void chip_readn(const struct flashctx *flash, uint8_t *buf, const chipaddr addr, size_t len);
/* print.c */
-char *flashbuses_to_text(enum chipbustype bustype);
int print_supported(void);
void print_supported_wiki(void);
@@ -251,8 +250,6 @@ char *strcat_realloc(char *dest, const char *src);
void tolower_string(char *str);
/* flashrom.c */
-extern int verbose_screen;
-extern int verbose_logfile;
extern const char flashrom_version[];
extern const char *chip_to_probe;
void map_flash_registers(struct flashctx *flash);
@@ -285,7 +282,13 @@ int write_buf_to_file(const unsigned char *buf, unsigned long size, const char *
+/* cli_common.c */
+char *flashbuses_to_text(enum chipbustype bustype);
+void print_chip_support_status(const struct flashchip *chip);
/* cli_output.c */
+extern int verbose_screen;
+extern int verbose_logfile;
int open_logfile(const char * const filename);
int close_logfile(void);
OpenPOWER on IntegriCloud