summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2017-05-17 15:34:22 +0100
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2017-05-24 10:47:05 +0100
commitda5241cb1591416d6aeba9f30ce395b58c97cb5d (patch)
tree7a87fdd1bcabbe2acd55c7e7f0c0a7f790d79281 /include
parentc1de3fdd32ff1848286fbe642a15f148f6bbf9a3 (diff)
Introduce `tf_snprintf`
This is a reduced version of `snprintf` that only supports formats '%d', '%i' and '%u'. It can be used when the full `snprintf` is not needed in order to save memory. If it finds an unknown format specifier, it prints an error message and panics. Change-Id: I2cb06fcdf74cda2c43caf73ae0762a91499fc04e Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/common/debug.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/common/debug.h b/include/common/debug.h
index 646dabaf..814cf840 100644
--- a/include/common/debug.h
+++ b/include/common/debug.h
@@ -64,6 +64,7 @@ void __dead2 do_panic(void);
void __dead2 __stack_chk_fail(void);
void tf_printf(const char *fmt, ...) __printflike(1, 2);
+int tf_snprintf(char *s, size_t n, const char *fmt, ...) __printflike(3, 4);
#endif /* __ASSEMBLY__ */
#endif /* __DEBUG_H__ */