summaryrefslogtreecommitdiff
path: root/flash.h
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2013-01-04 22:54:07 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2013-01-04 22:54:07 +0000
commit4f76e2f91d69dae46c42155d65b80e1d0f2bbdfc (patch)
tree7ac561c734007cfe88577cdad895f87524e3184f /flash.h
parentfc2c3133fbb24b2e770c6f3bea0a850272a70bbe (diff)
downloadflashrom-4f76e2f91d69dae46c42155d65b80e1d0f2bbdfc.tar.gz
Introduce msg_*warn.
Also, unify all outputs of "Warning:" and "Error:" to use normal capitalization instead of mixing it with all capitals. Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> Acked-by: Idwer Vollering <vidwer@gmail.com> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1643 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'flash.h')
-rw-r--r--flash.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/flash.h b/flash.h
index 3149b4f..a479286 100644
--- a/flash.h
+++ b/flash.h
@@ -271,16 +271,20 @@ void start_logging(void);
#endif
enum msglevel {
MSG_ERROR = 0,
- MSG_INFO = 1,
- MSG_DEBUG = 2,
- MSG_DEBUG2 = 3,
- MSG_SPEW = 4,
+ MSG_WARN = 1,
+ MSG_INFO = 2,
+ MSG_DEBUG = 3,
+ MSG_DEBUG2 = 4,
+ MSG_SPEW = 5,
};
/* Let gcc and clang check for correct printf-style format strings. */
int print(enum msglevel level, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
#define msg_gerr(...) print(MSG_ERROR, __VA_ARGS__) /* general errors */
#define msg_perr(...) print(MSG_ERROR, __VA_ARGS__) /* programmer errors */
#define msg_cerr(...) print(MSG_ERROR, __VA_ARGS__) /* chip errors */
+#define msg_gwarn(...) print(MSG_WARN, __VA_ARGS__) /* general warnings */
+#define msg_pwarn(...) print(MSG_WARN, __VA_ARGS__) /* programmer warnings */
+#define msg_cwarn(...) print(MSG_WARN, __VA_ARGS__) /* chip warnings */
#define msg_ginfo(...) print(MSG_INFO, __VA_ARGS__) /* general info */
#define msg_pinfo(...) print(MSG_INFO, __VA_ARGS__) /* programmer info */
#define msg_cinfo(...) print(MSG_INFO, __VA_ARGS__) /* chip info */