drivers/wifi: Remove unnecessary data structure copy
[coreboot2.git] / util / cbfstool / console / console.h
blobb25589ad26c260a3e8141cd1a54a2bbb2d9590fd
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef _CBFSTOOL_CONSOLE_H_
4 #define _CBFSTOOL_CONSOLE_H_
6 #include <stdio.h>
7 #include <commonlib/loglevel.h>
9 /* Message output */
10 extern int verbose;
11 #define ERROR(...) fprintf(stderr, "E: " __VA_ARGS__)
12 #define WARN(...) fprintf(stderr, "W: " __VA_ARGS__)
13 #define LOG(...) fprintf(stderr, __VA_ARGS__)
14 #define INFO(...) do { if (verbose > 0) fprintf(stderr, "INFO: " __VA_ARGS__); } while (0)
15 #define DEBUG(...) do { if (verbose > 1) fprintf(stderr, "DEBUG: " __VA_ARGS__); } while (0)
18 #define printk(lvl, ...) \
19 do { \
20 if ((lvl) <= BIOS_ERR) { \
21 ERROR(__VA_ARGS__); \
22 } else if ((lvl) <= BIOS_NOTICE) { \
23 WARN(__VA_ARGS__); \
24 } else if ((lvl) <= BIOS_INFO) { \
25 INFO(__VA_ARGS__); \
26 } else if ((lvl) <= BIOS_DEBUG) { \
27 DEBUG(__VA_ARGS__); \
28 } \
29 } while (0)
31 #endif