summaryrefslogtreecommitdiffstats
path: root/flash.h
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2012-06-06 09:17:06 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2012-06-06 09:17:06 +0000
commitabe7c186049e66ea1b6c5fcda2d46decf9a8ab40 (patch)
treec51dcfb54bf8bac3933e42b5e07168e74f7439cb /flash.h
parent5ea1eaf593ea610622cb4084e5f94c1f256a17c9 (diff)
downloadflashrom-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.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/flash.h b/flash.h
index 0c14ce1..cae1ea9 100644
--- a/flash.h
+++ b/flash.h
@@ -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,
OpenPOWER on IntegriCloud