1 Star 0 Fork 20

src-oepkgs-oE-rv/dmidecode

forked from src-openEuler/dmidecode 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
dmidecode-Fix-Redfish-Hostname-print-length.patch 990 Bytes
一键复制 编辑 原始数据 按行查看 历史
hexiaowen 提交于 2019-09-30 10:37 . Package init
From fde47bb227b8fa817c88d7e10a8eb771c46de1df Mon Sep 17 00:00:00 2001
From: Charles Rose <Charles.Rose@dell.com>
Date: Mon, 22 Oct 2018 09:48:02 +0200
Subject: [PATCH 1/8] dmidecode: Fix Redfish Hostname print length
Redfish Hostname prints beyond hlen characters. Fix it.
Signed-off-by: Charles Rose <charles.rose@dell.com>
Fixes: 78539b06117c ("dmidecode: Parse Modern Management Controller blocks")
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
dmidecode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dmidecode.c b/dmidecode.c
index a3e9d6c..7ac6438 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -3609,7 +3609,7 @@ static void dmi_parse_protocol_record(const char *prefix, u8 *rec)
hname = out_of_spec;
hlen = strlen(out_of_spec);
}
- printf("%s\t\tRedfish Service Hostname: %*s\n", prefix, hlen, hname);
+ printf("%s\t\tRedfish Service Hostname: %.*s\n", prefix, hlen, hname);
}
/*
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-oepkgs-oe-rv/dmidecode.git
git@gitee.com:src-oepkgs-oe-rv/dmidecode.git
src-oepkgs-oe-rv
dmidecode
dmidecode
master

搜索帮助