mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 02:15:45 +01:00 
			
		
		
		
	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>
This commit is contained in:
		| @@ -7,7 +7,7 @@ | ||||
| #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> | ||||
|   | ||||
| @@ -6,6 +6,7 @@ | ||||
|  */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <stdio.h> | ||||
| #include <vsprintf.h> | ||||
| #include <env.h> | ||||
| #include <net.h> | ||||
|   | ||||
| @@ -6,7 +6,7 @@ | ||||
|  */ | ||||
|  | ||||
| #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) | ||||
|   | ||||
| @@ -19,6 +19,7 @@ | ||||
| #include <command.h> | ||||
| #include <env.h> | ||||
| #include <part.h> | ||||
| #include <stdio.h> | ||||
| #include <vsprintf.h> | ||||
|  | ||||
| enum cmd_part_info { | ||||
|   | ||||
| @@ -8,7 +8,7 @@ | ||||
| #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 | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
| #include <cpu.h> | ||||
| #include <dm.h> | ||||
| #include <log.h> | ||||
| #include <vsprintf.h> | ||||
| #include <stdio.h> | ||||
| #include <linux/bitops.h> | ||||
|  | ||||
| #include "mpc83xx_cpu.h" | ||||
|   | ||||
| @@ -46,6 +46,23 @@ static inline int vprintf(const char *fmt, va_list args) | ||||
| } | ||||
| #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!) | ||||
|  */ | ||||
|   | ||||
| @@ -218,23 +218,6 @@ char *simple_itoa(ulong val); | ||||
|  */ | ||||
| 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 | ||||
|  * | ||||
|   | ||||
| @@ -12,6 +12,7 @@ | ||||
| #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, | ||||
|   | ||||
| @@ -11,7 +11,7 @@ | ||||
| #include <malloc.h> | ||||
| #include <mtd.h> | ||||
| #include <uuid.h> | ||||
| #include <vsprintf.h> | ||||
| #include <stdio.h> | ||||
|  | ||||
| #include <dm/ofnode.h> | ||||
|  | ||||
|   | ||||
| @@ -10,7 +10,7 @@ | ||||
|  | ||||
| #include <hexdump.h> | ||||
| #include <mapmem.h> | ||||
| #include <vsprintf.h> | ||||
| #include <stdio.h> | ||||
| #include <linux/ctype.h> | ||||
| #include <linux/compat.h> | ||||
| #include <linux/log2.h> | ||||
|   | ||||
| @@ -19,6 +19,7 @@ | ||||
| #include <hexdump.h> | ||||
| #include <stdarg.h> | ||||
| #include <uuid.h> | ||||
| #include <stdio.h> | ||||
| #include <vsprintf.h> | ||||
| #include <linux/ctype.h> | ||||
| #include <linux/err.h> | ||||
|   | ||||
| @@ -18,7 +18,7 @@ | ||||
| #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> | ||||
|   | ||||
| @@ -9,6 +9,7 @@ | ||||
| #include <log.h> | ||||
| #include <mapmem.h> | ||||
| #include <version_string.h> | ||||
| #include <stdio.h> | ||||
| #include <vsprintf.h> | ||||
| #include <test/suites.h> | ||||
| #include <test/test.h> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user