summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-08-21 08:22:33 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-08-31 05:22:44 -0700
commitfdbb87b113897d08cc0c8b9c4c460d02b47063f7 (patch)
tree581466c16986a893f94e105133cf7253c33807aa
parent0c274a902539249db7e11d019dadfa0cbae1fd74 (diff)
downloadvboot-fdbb87b113897d08cc0c8b9c4c460d02b47063f7.tar.gz
futility: Add 'Error' utility macro
An 'Error' is easier than writing fprintf(stderr, "ERROR: %s", ...). BUG=chromium:875551 TEST=make futil; BRANCH=None Change-Id: Id4a849014dc202319dc1932289c68f43b2430c7d Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183647 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--futility/futility.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/futility/futility.h b/futility/futility.h
index c8150035..f0635750 100644
--- a/futility/futility.h
+++ b/futility/futility.h
@@ -91,6 +91,9 @@ extern const struct futil_cmd_t *const futil_cmds[];
} while (0)
#endif
+/* Print error messages (similar to VbExError but won't exit). */
+#define Error(format, ...) fprintf(stderr, "ERROR: " format, ##__VA_ARGS__ )
+
/* Debug output (off by default) */
extern int debugging_enabled;
void Debug(const char *format, ...);