1 Star 0 Fork 12

streamlet_hy/ipmitool-oe

forked from src-openEuler/ipmitool 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
plugins-open-Properly-enable-event-receiver-35.patch 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
hexiaowen 提交于 2019-09-30 10:53 . Package init
From c70665c3d1ae8d19634eb2ea386d1065a4cff506 Mon Sep 17 00:00:00 2001
From: BenjaminFair <fair.105@osu.edu>
Date: Sun, 9 Sep 2018 04:48:58 -0700
Subject: [PATCH 065/119] plugins: open: Properly enable event receiver (#35)
The ioctl to enable the event receiver in the OpenIPMI interface is
called with an argument of 0, which tells OpenIPMI to disable it. Set
the argument to 1 instead so that it will be enabled.
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
---
src/plugins/open/open.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/plugins/open/open.c b/src/plugins/open/open.c
index fd1defd..63f3624 100644
--- a/src/plugins/open/open.c
+++ b/src/plugins/open/open.c
@@ -91,8 +91,6 @@ extern int verbose;
static int
ipmi_openipmi_open(struct ipmi_intf * intf)
{
- int i = 0;
-
char ipmi_dev[16];
char ipmi_devfs[16];
char ipmi_devfs2[16];
@@ -119,7 +117,9 @@ ipmi_openipmi_open(struct ipmi_intf * intf)
}
}
- if (ioctl(intf->fd, IPMICTL_SET_GETS_EVENTS_CMD, &i) < 0) {
+ int receive_events = TRUE;
+
+ if (ioctl(intf->fd, IPMICTL_SET_GETS_EVENTS_CMD, &receive_events) < 0) {
lperror(LOG_ERR, "Could not enable event receiver");
return -1;
}
--
2.19.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/streamlet_hy/ipmitool.git
git@gitee.com:streamlet_hy/ipmitool.git
streamlet_hy
ipmitool
ipmitool-oe
master

搜索帮助