"Das U-Boot" Source Tree

include: Move snprintf to stdio.h

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>

authored by

Raymond Mao and committed by
Tom Rini
cb73fe9e 0fe031dd

+29 -24
+1 -1
arch/arc/lib/cpu.c
··· 7 7 #include <clock_legacy.h> 8 8 #include <init.h> 9 9 #include <malloc.h> 10 - #include <vsprintf.h> 10 + #include <stdio.h> 11 11 #include <asm/arcregs.h> 12 12 #include <asm/cache.h> 13 13 #include <asm/global_data.h>
+1
board/Synology/common/legacy.c
··· 6 6 */ 7 7 8 8 #include <config.h> 9 + #include <stdio.h> 9 10 #include <vsprintf.h> 10 11 #include <env.h> 11 12 #include <net.h>
+1 -1
board/ti/common/fdt_ops.c
··· 6 6 */ 7 7 8 8 #include <env.h> 9 - #include <vsprintf.h> 9 + #include <stdio.h> 10 10 #include "fdt_ops.h" 11 11 12 12 void ti_set_fdt_env(const char *board_name, struct ti_fdt_map *fdt_map)
+1
cmd/part.c
··· 19 19 #include <command.h> 20 20 #include <env.h> 21 21 #include <part.h> 22 + #include <stdio.h> 22 23 #include <vsprintf.h> 23 24 24 25 enum cmd_part_info {
+1 -1
common/button_cmd.c
··· 8 8 #include <command.h> 9 9 #include <env.h> 10 10 #include <log.h> 11 - #include <vsprintf.h> 11 + #include <stdio.h> 12 12 13 13 /* Some sane limit "just in case" */ 14 14 #define MAX_BTN_CMDS 32
+1 -1
drivers/cpu/mpc83xx_cpu.c
··· 9 9 #include <cpu.h> 10 10 #include <dm.h> 11 11 #include <log.h> 12 - #include <vsprintf.h> 12 + #include <stdio.h> 13 13 #include <linux/bitops.h> 14 14 15 15 #include "mpc83xx_cpu.h"
+17
include/stdio.h
··· 46 46 } 47 47 #endif 48 48 49 + /** 50 + * Format a string and place it in a buffer 51 + * 52 + * @buf: The buffer to place the result into 53 + * @size: The size of the buffer, including the trailing null space 54 + * @fmt: The format string to use 55 + * @...: Arguments for the format string 56 + * Return: the number of characters which would be 57 + * generated for the given input, excluding the trailing null, 58 + * as per ISO C99. If the return is greater than or equal to 59 + * @size, the resulting string is truncated. 60 + * 61 + * See the vsprintf() documentation for format string extensions over C99. 62 + */ 63 + int snprintf(char *buf, size_t size, const char *fmt, ...) 64 + __attribute__ ((format (__printf__, 3, 4))); 65 + 49 66 /* 50 67 * FILE based functions (can only be used AFTER relocation!) 51 68 */
-17
include/vsprintf.h
··· 225 225 * @size: The size of the buffer, including the trailing null space 226 226 * @fmt: The format string to use 227 227 * @...: Arguments for the format string 228 - * Return: the number of characters which would be 229 - * generated for the given input, excluding the trailing null, 230 - * as per ISO C99. If the return is greater than or equal to 231 - * @size, the resulting string is truncated. 232 - * 233 - * See the vsprintf() documentation for format string extensions over C99. 234 - */ 235 - int snprintf(char *buf, size_t size, const char *fmt, ...) 236 - __attribute__ ((format (__printf__, 3, 4))); 237 - 238 - /** 239 - * Format a string and place it in a buffer 240 - * 241 - * @buf: The buffer to place the result into 242 - * @size: The size of the buffer, including the trailing null space 243 - * @fmt: The format string to use 244 - * @...: Arguments for the format string 245 228 * 246 229 * The return value is the number of characters written into @buf not including 247 230 * the trailing '\0'. If @size is == 0 the function returns 0.
+1
lib/display_options.c
··· 12 12 #include <linux/ctype.h> 13 13 #include <linux/kernel.h> 14 14 #include <asm/io.h> 15 + #include <stdio.h> 15 16 #include <vsprintf.h> 16 17 17 18 char *display_options_get_banner_priv(bool newlines, const char *build_tag,
+1 -1
lib/fwu_updates/fwu_mtd.c
··· 11 11 #include <malloc.h> 12 12 #include <mtd.h> 13 13 #include <uuid.h> 14 - #include <vsprintf.h> 14 + #include <stdio.h> 15 15 16 16 #include <dm/ofnode.h> 17 17
+1 -1
lib/hexdump.c
··· 10 10 11 11 #include <hexdump.h> 12 12 #include <mapmem.h> 13 - #include <vsprintf.h> 13 + #include <stdio.h> 14 14 #include <linux/ctype.h> 15 15 #include <linux/compat.h> 16 16 #include <linux/log2.h>
+1
lib/vsprintf.c
··· 19 19 #include <hexdump.h> 20 20 #include <stdarg.h> 21 21 #include <uuid.h> 22 + #include <stdio.h> 22 23 #include <vsprintf.h> 23 24 #include <linux/ctype.h> 24 25 #include <linux/err.h>
+1 -1
test/dm/scmi.c
··· 18 18 #include <scmi_agent.h> 19 19 #include <scmi_agent-uclass.h> 20 20 #include <scmi_protocols.h> 21 - #include <vsprintf.h> 21 + #include <stdio.h> 22 22 #include <asm/scmi_test.h> 23 23 #include <dm/device-internal.h> 24 24 #include <dm/test.h>
+1
test/print_ut.c
··· 9 9 #include <log.h> 10 10 #include <mapmem.h> 11 11 #include <version_string.h> 12 + #include <stdio.h> 12 13 #include <vsprintf.h> 13 14 #include <test/suites.h> 14 15 #include <test/test.h>