mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 19:17:22 +00:00
Changes return value of ipmi_lan_stats_get() and ipmi_lan_stats_clear() on
error in 'lib/ipmi_lanp.c'. Changes return value from 0 to (-1).
This commit is contained in:
parent
4a462cd714
commit
e230427138
@ -2025,13 +2025,13 @@ ipmi_lan_stats_get(struct ipmi_intf * intf, uint8_t chan)
|
|||||||
rsp = intf->sendrecv(intf, &req);
|
rsp = intf->sendrecv(intf, &req);
|
||||||
if (rsp == NULL) {
|
if (rsp == NULL) {
|
||||||
lprintf(LOG_ERR, "Get LAN Stats command failed");
|
lprintf(LOG_ERR, "Get LAN Stats command failed");
|
||||||
return 0;
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsp->ccode > 0) {
|
if (rsp->ccode > 0) {
|
||||||
lprintf(LOG_ERR, "Get LAN Stats command failed: %s",
|
lprintf(LOG_ERR, "Get LAN Stats command failed: %s",
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
val2str(rsp->ccode, completion_code_vals));
|
||||||
return 0;
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (verbose > 1) {
|
if (verbose > 1) {
|
||||||
@ -2111,13 +2111,13 @@ ipmi_lan_stats_clear(struct ipmi_intf * intf, uint8_t chan)
|
|||||||
rsp = intf->sendrecv(intf, &req);
|
rsp = intf->sendrecv(intf, &req);
|
||||||
if (rsp == NULL) {
|
if (rsp == NULL) {
|
||||||
lprintf(LOG_INFO, "Get LAN Stats command failed");
|
lprintf(LOG_INFO, "Get LAN Stats command failed");
|
||||||
return 0;
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsp->ccode > 0) {
|
if (rsp->ccode > 0) {
|
||||||
lprintf(LOG_INFO, "Get LAN Stats command failed: %s",
|
lprintf(LOG_INFO, "Get LAN Stats command failed: %s",
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
val2str(rsp->ccode, completion_code_vals));
|
||||||
return 0;
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user