+// SPDX-License-Identifier: LGPL-2.1+
/*
* Tiny printf version for SPL
*
* http://www.sparetimelabs.com/printfrevisited/printfrevisited.php
*
* Copyright (C) 2004,2008 Kustaa Nyholm
- *
- * SPDX-License-Identifier: LGPL-2.1+
*/
#include <common.h>
void (*putc)(struct printf_info *info, char ch);
};
-static void putc_normal(struct printf_info *info, char ch)
-{
- putc(ch);
-}
-
static void out(struct printf_info *info, char c)
{
*info->bf++ = c;
return 0;
}
+#if CONFIG_IS_ENABLED(PRINTF)
+static void putc_normal(struct printf_info *info, char ch)
+{
+ putc(ch);
+}
+
int vprintf(const char *fmt, va_list va)
{
struct printf_info info;
return ret;
}
+#endif
static void putc_outstr(struct printf_info *info, char ch)
{
return ret;
}
-
-void __assert_fail(const char *assertion, const char *file, unsigned line,
- const char *function)
-{
- /* This will not return */
- printf("%s:%u: %s: Assertion `%s' failed.", file, line, function,
- assertion);
- hang();
-}