mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-09 02:51:21 +00:00
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>
This commit is contained in:
parent
c1de3fdd32
commit
da5241cb15
3 changed files with 110 additions and 0 deletions
|
@ -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__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue