mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
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>
This commit is contained in:
9
flash.h
9
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 *
|
||||
*/
|
||||
#define ERROR_FLASHROM_LIMIT -201
|
||||
|
||||
/* 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;
|
||||
#ifndef STANDALONE
|
||||
int open_logfile(const char * const filename);
|
||||
int close_logfile(void);
|
||||
|
Reference in New Issue
Block a user