2 * This file is part of the coreboot project.
4 * Copyright 2015 Google Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #ifndef _CBFSTOOL_CONSOLE_H_
17 #define _CBFSTOOL_CONSOLE_H_
20 #include <commonlib/loglevel.h>
24 #define ERROR(...) { fprintf(stderr, "E: " __VA_ARGS__); }
25 #define WARN(...) { fprintf(stderr, "W: " __VA_ARGS__); }
26 #define LOG(...) { fprintf(stderr, __VA_ARGS__); }
27 #define INFO(...) { if (verbose > 0) fprintf(stderr, "INFO: " __VA_ARGS__); }
28 #define DEBUG(...) { if (verbose > 1) fprintf(stderr, "DEBUG: " __VA_ARGS__); }
31 #define printk(lvl, ...) \
33 if ((lvl) <= BIOS_ERR) { \
35 } else if ((lvl) <= BIOS_NOTICE) { \
37 } else if ((lvl) <= BIOS_INFO) { \
39 } else if ((lvl) <= BIOS_DEBUG) { \