summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a407ce8)
raw | patch | inline | side by side (parent: a407ce8)
author | Pavel Rochnyack <pavel2000@ngs.ru> | |
Mon, 9 Oct 2017 05:52:21 +0000 (12:52 +0700) | ||
committer | Pavel Rochnyack <pavel2000@ngs.ru> | |
Mon, 9 Oct 2017 06:01:49 +0000 (13:01 +0700) |
src/ipmi.c | patch | blob | history |
diff --git a/src/ipmi.c b/src/ipmi.c
index 32d6e510a836f44d01ab10d51f5ca719334a5f5f..fde305c38ee22fe8bc3c868a8720c5351d6f17e3 100644 (file)
--- a/src/ipmi.c
+++ b/src/ipmi.c
#include <OpenIPMI/ipmi_smi.h>
#include <OpenIPMI/ipmiif.h>
+#define ERR_BUF_SIZE 1024
+
/*
* Private data types
*/
* Misc private functions
*/
static void c_ipmi_error(c_ipmi_instance_t *st, const char *func, int status) {
- char errbuf[4096] = {0};
+ char errbuf[ERR_BUF_SIZE] = {0};
if (IPMI_IS_OS_ERR(status) || IPMI_IS_RMCPP_ERR(status) ||
IPMI_IS_IPMI_ERR(status)) {
static void c_ipmi_log(os_handler_t *handler, const char *format,
enum ipmi_log_type_e log_type, va_list ap) {
- char msg[1024];
+ char msg[ERR_BUF_SIZE];
vsnprintf(msg, sizeof(msg), format, ap);
INFO("ipmi plugin: sensor_read_handler: Sensor `%s` of `%s` timed out.",
list_item->sensor_name, st->name);
} else {
- char errbuf[128] = {0};
+ char errbuf[ERR_BUF_SIZE] = {0};
ipmi_get_error_string(err, errbuf, sizeof(errbuf) - 1);
if (IPMI_IS_IPMI_ERR(err))