snprintf: Remove the %o and %p support

%x could be used to replace the %o print option.
%x could be used to replace the %p print option also.

Tracked-On: #1656
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yin Fengwei 2018-10-30 16:03:57 +08:00 committed by lijinxia
parent 6150c0611f
commit 1b1338bc04

View File

@ -508,19 +508,6 @@ void do_print(const char *fmt_arg, struct print_param *param,
uint32_t));
}
}
/* octal number */
else if (ch == 'o') {
if ((param->vars.flags &
PRINT_FLAG_LONG_LONG) != 0U) {
print_pow2(param,
__builtin_va_arg(args,
uint64_t), 3U);
} else {
print_pow2(param,
__builtin_va_arg(args,
uint32_t), 3U);
}
}
/* hexadecimal number */
else if ((ch == 'X') || (ch == 'x')) {
if (ch == 'X') {
@ -546,12 +533,6 @@ void do_print(const char *fmt_arg, struct print_param *param,
}
print_string(param, s);
}
/* pointer argument */
else if (ch == 'p') {
param->vars.flags |= PRINT_FLAG_ALTERNATE_FORM;
print_pow2(param, (uint64_t)
__builtin_va_arg(args, void *), 4U);
}
/* single character argument */
else if (ch == 'c') {
char c[2];