aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-08-15 17:02:28 +0100
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-08-22 10:26:05 +0100
commit870ce3ddd3b33c59418a7dba703e8a66ec75f98f (patch)
tree263cf675728e0ec8e0b560cf31f7043cb895df41 /include
parentcb6dbfe3dc56088895c06b0492cfce289288444e (diff)
libc: Move tf_printf and tf_snprintf to libc
Change their names to printf and snprintf. They are much smaller than the previous versions we had, which makes them better suited for the Trusted Firmware. Change-Id: Ia872af91b7b967c47fce012eccecede7873a3daf Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/common/debug.h10
-rw-r--r--include/lib/libc/stdio.h10
2 files changed, 7 insertions, 13 deletions
diff --git a/include/common/debug.h b/include/common/debug.h
index 3c99ce50..4c5560f5 100644
--- a/include/common/debug.h
+++ b/include/common/debug.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef __DEBUG_H__
-#define __DEBUG_H__
+#ifndef DEBUG_H
+#define DEBUG_H
/*
* The log output macros print output to the console. These macros produce
@@ -90,11 +90,7 @@ void __dead2 do_panic(void);
void __dead2 __stack_chk_fail(void);
void tf_log(const char *fmt, ...) __printflike(1, 2);
-int tf_printf(const char *fmt, ...) __printflike(1, 2);
-int tf_snprintf(char *s, size_t n, const char *fmt, ...) __printflike(3, 4);
-int tf_vprintf(const char *fmt, va_list args);
-int tf_string_print(const char *str);
void tf_log_set_max_level(unsigned int log_level);
#endif /* __ASSEMBLY__ */
-#endif /* __DEBUG_H__ */
+#endif /* DEBUG_H */
diff --git a/include/lib/libc/stdio.h b/include/lib/libc/stdio.h
index 83fd18c5..3d9323ef 100644
--- a/include/lib/libc/stdio.h
+++ b/include/lib/libc/stdio.h
@@ -11,6 +11,7 @@
#ifndef STDIO_H
#define STDIO_H
+#include <cdefs.h>
#include <stdio_.h>
#ifndef NULL
@@ -19,14 +20,11 @@
#define EOF -1
-int printf(const char *fmt, ...);
-int snprintf(char *s, size_t n, const char *fmt, ...);
-int sprintf(char *s, const char *fmt, ...);
-int sscanf(const char *s, const char *fmt, ...);
+int printf(const char *fmt, ...) __printflike(1, 2);
+int snprintf(char *s, size_t n, const char *fmt, ...) __printflike(3, 4);
#ifdef STDARG_H
-int vsnprintf(char *s, size_t n, const char *fmt, va_list arg);
-int vsprintf(char *s, const char *fmt, va_list arg);
+int vprintf(const char *fmt, va_list args);
#endif
int putchar(int c);