summaryrefslogtreecommitdiff
path: root/util/cbfstool/common.h
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-10-01 14:25:19 -0500
committerAaron Durbin <adurbin@chromium.org>2015-10-02 12:16:09 +0000
commitd38e3de68c1e32d86337622b3f3d4559aa04eb33 (patch)
tree9cc245b17db97ae65ed5eca526ea8b0383decef1 /util/cbfstool/common.h
parent7ffcc0be63bc8f253c9d4d971ef75be19038963e (diff)
downloadcoreboot-d38e3de68c1e32d86337622b3f3d4559aa04eb33.tar.xz
cbfstool: provide printk() to cbfstool code
For shared compilation units between coreboot proper and cbfstool that means one needs to provide printk logging. Therefore, provide printk() at <console/console.h> to mimic coreboot's environment. BUG=chrome-os-partner:44827 BRANCH=None TEST=Built cbfstool with code that includes and uses <console/console.h>. Change-Id: I8e54d403526a397e4fd117738a367a0a7bb71637 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/11774 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/cbfstool/common.h')
-rw-r--r--util/cbfstool/common.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h
index 86ae484544..b6386533cf 100644
--- a/util/cbfstool/common.h
+++ b/util/cbfstool/common.h
@@ -26,17 +26,11 @@
#include <string.h>
#include <assert.h>
+#include <console/console.h>
+
/* Endianess */
#include "swab.h"
-/* Message output */
-extern int verbose;
-#define ERROR(...) { fprintf(stderr, "E: " __VA_ARGS__); }
-#define WARN(...) { fprintf(stderr, "W: " __VA_ARGS__); }
-#define LOG(...) { fprintf(stderr, __VA_ARGS__); }
-#define INFO(...) { if (verbose > 0) fprintf(stderr, "INFO: " __VA_ARGS__); }
-#define DEBUG(...) { if (verbose > 1) fprintf(stderr, "DEBUG: " __VA_ARGS__); }
-
/* Helpers */
#define ARRAY_SIZE(a) (int)(sizeof(a) / sizeof((a)[0]))
#define ALIGN(val, by) (((val) + (by)-1)&~((by)-1))