1 Star 0 Fork 50

Meredith/grub2

forked from src-anolis-os/grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0475-kern-misc-Split-parse_printf_args-into-format-parsin.patch 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2022-04-13 15:15 . update to grub2-2.02-120.el8.src.rpm
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Thomas Frauendorfer | Miray Software <tf@miray.de>
Date: Mon, 15 Feb 2021 13:40:16 +0100
Subject: [PATCH] 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>
---
grub-core/kern/misc.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
index 475f3e0ef..ebfcc95f0 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -711,8 +711,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;
@@ -870,6 +869,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...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yueeranna/grub2.git
git@gitee.com:yueeranna/grub2.git
yueeranna
grub2
grub2
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385