Move snprintf to stdio.h since it is needed by exteranl libraries.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
#include <clock_legacy.h>
#include <init.h>
#include <malloc.h>
-#include <vsprintf.h>
+#include <stdio.h>
#include <asm/arcregs.h>
#include <asm/cache.h>
#include <asm/global_data.h>
*/
#include <config.h>
+#include <stdio.h>
#include <vsprintf.h>
#include <env.h>
#include <net.h>
*/
#include <env.h>
-#include <vsprintf.h>
+#include <stdio.h>
#include "fdt_ops.h"
void ti_set_fdt_env(const char *board_name, struct ti_fdt_map *fdt_map)
#include <command.h>
#include <env.h>
#include <part.h>
+#include <stdio.h>
#include <vsprintf.h>
enum cmd_part_info {
#include <command.h>
#include <env.h>
#include <log.h>
-#include <vsprintf.h>
+#include <stdio.h>
/* Some sane limit "just in case" */
#define MAX_BTN_CMDS 32
#include <cpu.h>
#include <dm.h>
#include <log.h>
-#include <vsprintf.h>
+#include <stdio.h>
#include <linux/bitops.h>
#include "mpc83xx_cpu.h"
}
#endif
+/**
+ * Format a string and place it in a buffer
+ *
+ * @buf: The buffer to place the result into
+ * @size: The size of the buffer, including the trailing null space
+ * @fmt: The format string to use
+ * @...: Arguments for the format string
+ * Return: the number of characters which would be
+ * generated for the given input, excluding the trailing null,
+ * as per ISO C99. If the return is greater than or equal to
+ * @size, the resulting string is truncated.
+ *
+ * See the vsprintf() documentation for format string extensions over C99.
+ */
+int snprintf(char *buf, size_t size, const char *fmt, ...)
+ __attribute__ ((format (__printf__, 3, 4)));
+
/*
* FILE based functions (can only be used AFTER relocation!)
*/
*/
char *simple_xtoa(ulong num);
-/**
- * Format a string and place it in a buffer
- *
- * @buf: The buffer to place the result into
- * @size: The size of the buffer, including the trailing null space
- * @fmt: The format string to use
- * @...: Arguments for the format string
- * Return: the number of characters which would be
- * generated for the given input, excluding the trailing null,
- * as per ISO C99. If the return is greater than or equal to
- * @size, the resulting string is truncated.
- *
- * See the vsprintf() documentation for format string extensions over C99.
- */
-int snprintf(char *buf, size_t size, const char *fmt, ...)
- __attribute__ ((format (__printf__, 3, 4)));
-
/**
* Format a string and place it in a buffer
*
#include <linux/ctype.h>
#include <linux/kernel.h>
#include <asm/io.h>
+#include <stdio.h>
#include <vsprintf.h>
char *display_options_get_banner_priv(bool newlines, const char *build_tag,
#include <malloc.h>
#include <mtd.h>
#include <uuid.h>
-#include <vsprintf.h>
+#include <stdio.h>
#include <dm/ofnode.h>
#include <hexdump.h>
#include <mapmem.h>
-#include <vsprintf.h>
+#include <stdio.h>
#include <linux/ctype.h>
#include <linux/compat.h>
#include <linux/log2.h>
#include <hexdump.h>
#include <stdarg.h>
#include <uuid.h>
+#include <stdio.h>
#include <vsprintf.h>
#include <linux/ctype.h>
#include <linux/err.h>
#include <scmi_agent.h>
#include <scmi_agent-uclass.h>
#include <scmi_protocols.h>
-#include <vsprintf.h>
+#include <stdio.h>
#include <asm/scmi_test.h>
#include <dm/device-internal.h>
#include <dm/test.h>
#include <log.h>
#include <mapmem.h>
#include <version_string.h>
+#include <stdio.h>
#include <vsprintf.h>
#include <test/suites.h>
#include <test/test.h>