1 Star 0 Fork 99

yangqiming/grub2

forked from src-openEuler/grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0167-Don-t-make-grub_strtoull-print-an-error-if-no-conver.patch 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
hanzj0122_admin 提交于 2020-07-29 20:47 . update to 2.04
From 46b860c3c423cefdf427aa547e43927400d02f8c Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Mon, 11 Feb 2019 15:14:10 +0100
Subject: [PATCH 167/220] Don't make grub_strtoull() print an error if no
conversion is performed
Callers can check if grub_errno was set to GRUB_ERR_BAD_NUMBER, so there's
no need to print an error if a conversion couldn't be performed. This just
pollutes the output with noisy error messages.
Resolves: rhbz#1674512
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
grub-core/kern/misc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
index 18a7dbf..87afb43 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -475,8 +475,7 @@ grub_strtoull (const char * restrict str, const char ** const restrict end,
if (! found)
{
- grub_error (GRUB_ERR_BAD_NUMBER,
- N_("unrecognized number"));
+ grub_errno = GRUB_ERR_BAD_NUMBER;
return 0;
}
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yyangqiming/grub2.git
git@gitee.com:yyangqiming/grub2.git
yyangqiming
grub2
grub2
master

搜索帮助