Commit 128c5f02 authored by Heyi Guo's avatar Heyi Guo
Browse files

libc/printf: add support to print "%" character



Enable printf() in TF-A to print "%" character as C standard, which
may be used in platform porting to print percentage information.
Signed-off-by: default avatarHeyi Guo <guoheyi@linux.alibaba.com>
Change-Id: I7af2f1d153548e426f423fce15dc48b0da56c622
parent f03c4ea8
/*
* Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2014-2021, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
......@@ -108,6 +108,9 @@ int vprintf(const char *fmt, va_list args)
/* Check the format specifier */
loop:
switch (*fmt) {
case '%':
(void)putchar('%');
break;
case 'i': /* Fall through to next one */
case 'd':
num = get_num_va_args(args, l_count);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment