summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0d9be8e)
raw | patch | inline | side by side (parent: 0d9be8e)
author | Pavel Rochnyack <pavel2000@ngs.ru> | |
Mon, 9 Oct 2017 15:27:41 +0000 (22:27 +0700) | ||
committer | Pavel Rochnyack <pavel2000@ngs.ru> | |
Mon, 9 Oct 2017 19:22:20 +0000 (02:22 +0700) |
src/ipmi.c | patch | blob | history |
diff --git a/src/ipmi.c b/src/ipmi.c
index fde305c38ee22fe8bc3c868a8720c5351d6f17e3..c9b71a99aba63c212c0c04d1a5fc20c2c8fa679f 100644 (file)
--- a/src/ipmi.c
+++ b/src/ipmi.c
if (strcasecmp("Sensor", child->key) == 0)
ignorelist_add(st->ignorelist, ci->values[0].value.string);
else if (strcasecmp("IgnoreSelected", child->key) == 0) {
- if (ci->values[0].value.boolean)
+ _Bool t;
+ status = cf_util_get_boolean(child, &t);
+ if (status != 0)
+ break;
+ if (t)
ignorelist_set_invert(st->ignorelist, /* invert = */ 0);
else
ignorelist_set_invert(st->ignorelist, /* invert = */ 1);
} else if (strcasecmp("NotifyIPMIConnectionState", child->key) == 0) {
- if (ci->values[0].value.boolean)
- st->notify_conn = 1;
+ status = cf_util_get_boolean(child, &st->notify_conn);
} else if (strcasecmp("NotifySensorAdd", child->key) == 0) {
- if (ci->values[0].value.boolean)
- st->notify_add = 1;
+ status = cf_util_get_boolean(child, &st->notify_add);
} else if (strcasecmp("NotifySensorRemove", child->key) == 0) {
- if (ci->values[0].value.boolean)
- st->notify_remove = 1;
+ status = cf_util_get_boolean(child, &st->notify_remove);
} else if (strcasecmp("NotifySensorNotPresent", child->key) == 0) {
- if (ci->values[0].value.boolean)
- st->notify_notpresent = 1;
+ status = cf_util_get_boolean(child, &st->notify_notpresent);
} else if (strcasecmp("SELEnabled", child->key) == 0) {
- if (ci->values[0].value.boolean)
- st->sel_enabled = 1;
+ status = cf_util_get_boolean(child, &st->sel_enabled);
} else if (strcasecmp("SELClearEvent", child->key) == 0) {
- if (ci->values[0].value.boolean)
- st->sel_clear_event = 1;
+ status = cf_util_get_boolean(child, &st->sel_clear_event);
} else if (strcasecmp("Host", child->key) == 0)
status = cf_util_get_string(child, &st->host);
else if (strcasecmp("Address", child->key) == 0)
oconfig_item_t *child = ci->children + i;
if (strcasecmp("Instance", child->key) == 0) {
- c_ipmi_config_add_instance(child);
+ int status = c_ipmi_config_add_instance(child);
+ if (status != 0)
+ return status;
+
have_instance_block = 1;
} else if (!have_instance_block) {
/* Non-instance option: Assume legacy configuration (without <Instance />