mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
Re-work ccode eval in ipmi_get_channel_medium()
Commit re-works ccode eval in ipmi_get_channel_medium() as the previous one didn't work and led to dead-code.
This commit is contained in:
parent
12b85b3c7b
commit
6b8d55d68b
@ -653,13 +653,11 @@ ipmi_get_channel_medium(struct ipmi_intf *intf, uint8_t channel)
|
||||
|
||||
channel_info.channel = channel;
|
||||
ccode = _ipmi_get_channel_info(intf, &channel_info);
|
||||
if (ccode < 0) {
|
||||
eval_ccode(ccode);
|
||||
lprintf(LOG_ERR, "Get Channel Info command failed");
|
||||
return 0;
|
||||
} else if (ccode = 0xCC) {
|
||||
if (ccode == 0xCC) {
|
||||
return IPMI_CHANNEL_MEDIUM_RESERVED;
|
||||
} else {
|
||||
} else if (ccode < 0 && eval_ccode(ccode) != 0) {
|
||||
return 0;
|
||||
} else if (ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get Channel Info command failed: %s",
|
||||
val2str(ccode, completion_code_vals));
|
||||
return IPMI_CHANNEL_MEDIUM_RESERVED;
|
||||
|
Loading…
x
Reference in New Issue
Block a user