mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-03 14:40:17 +00:00
kern/misc: Split parse_printf_args() into format parsing and va_list handling
This patch is preparing for a follow up patch which will use the format parsing part to compare the arguments in a printf() format from an external source against a printf() format with expected arguments. Signed-off-by: Thomas Frauendorfer | Miray Software <tf@miray.de> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
968de8c23c
commit
7f11bde314
@ -645,8 +645,7 @@ grub_lltoa (char *str, int c, unsigned long long n)
|
||||
}
|
||||
|
||||
static void
|
||||
parse_printf_args (const char *fmt0, struct printf_args *args,
|
||||
va_list args_in)
|
||||
parse_printf_arg_fmt (const char *fmt0, struct printf_args *args)
|
||||
{
|
||||
const char *fmt;
|
||||
char c;
|
||||
@ -804,6 +803,14 @@ parse_printf_args (const char *fmt0, struct printf_args *args,
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
parse_printf_args (const char *fmt0, struct printf_args *args, va_list args_in)
|
||||
{
|
||||
grub_size_t n;
|
||||
|
||||
parse_printf_arg_fmt (fmt0, args);
|
||||
|
||||
for (n = 0; n < args->count; n++)
|
||||
switch (args->ptr[n].type)
|
||||
|
Loading…
Reference in New Issue
Block a user