This is needed by upcoming list_sort implementation. Signed-off-by: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxxxxxxxx> --- include/printk.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/printk.h b/include/printk.h index 822f64c..4b76ca1 100644 --- a/include/printk.h +++ b/include/printk.h @@ -92,6 +92,16 @@ static inline int pr_print(int level, const char *format, ...) #define debug(fmt, arg...) __pr_printk(7, pr_fmt(fmt), ##arg) #define pr_vdebug(fmt, arg...) __pr_printk(8, pr_fmt(fmt), ##arg) +#define printk_once(fmt, ...) \ +({ \ + static bool __print_once ; \ + \ + if (!__print_once) { \ + __print_once = true; \ + printk(fmt, ##__VA_ARGS__); \ + } \ +}) + struct log_entry { struct list_head list; char *msg; -- 2.7.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox