diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2012-06-06 09:17:06 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2012-06-06 09:17:06 +0000 |
commit | abe7c186049e66ea1b6c5fcda2d46decf9a8ab40 (patch) | |
tree | c51dcfb54bf8bac3933e42b5e07168e74f7439cb /flash.h | |
parent | 5ea1eaf593ea610622cb4084e5f94c1f256a17c9 (diff) | |
download | flashrom-abe7c186049e66ea1b6c5fcda2d46decf9a8ab40.zip flashrom-abe7c186049e66ea1b6c5fcda2d46decf9a8ab40.tar.gz |
Add logfile support
Usage: flashrom --output logfile.txt
Logfile output has at least dbg2 verbosity or screen verbosity,
whichever is greater.
Tested on Linux, Windows and FreeBSD.
Corresponding to flashrom svn r1540.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer@gmail.com>
Diffstat (limited to 'flash.h')
-rw-r--r-- | flash.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -228,7 +228,8 @@ enum write_granularity { write_gran_1byte, write_gran_256bytes, }; -extern int verbose; +extern int verbose_screen; +extern int verbose_logfile; extern const char flashrom_version[]; extern char *chip_to_probe; void map_flash_registers(struct flashctx *flash); @@ -244,6 +245,7 @@ int verify_range(struct flashctx *flash, uint8_t *cmpbuf, unsigned int start, un int need_erase(uint8_t *have, uint8_t *want, unsigned int len, enum write_granularity gran); char *strcat_realloc(char *dest, const char *src); void print_version(void); +void print_buildinfo(void); void print_banner(void); void list_programmers_linebreak(int startcol, int cols, int paren); int selfcheck(void); @@ -268,6 +270,11 @@ int write_buf_to_file(unsigned char *buf, unsigned long size, const char *filena #define ERROR_FLASHROM_LIMIT -201 /* cli_output.c */ +#ifndef STANDALONE +int open_logfile(const char * const filename); +int close_logfile(void); +void start_logging(void); +#endif enum msglevel { MSG_ERROR = 0, MSG_INFO = 1, |