mirror of
https://github.com/ipmitool/ipmitool.git
synced 2026-01-23 07:04:21 +08:00
handle 0xcc response without error
This commit is contained in:
parent
fe38fb4e7b
commit
380f330e15
@ -97,28 +97,31 @@ get_lan_param(struct ipmi_intf * intf, uint8_t chan, int param)
|
|||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
rsp = intf->sendrecv(intf, &req);
|
||||||
if (rsp == NULL) {
|
if (rsp == NULL) {
|
||||||
lprintf(LOG_INFO, "Get LAN Parameter command failed");
|
lprintf(LOG_INFO, "Get LAN Parameter '%s' command failed", p->desc);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (rsp->ccode == 0x80) {
|
|
||||||
/* parameter not supported
|
switch (rsp->ccode)
|
||||||
* return lan_param without data
|
{
|
||||||
*/
|
case 0x00: /* successful */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x80: /* parameter not supported */
|
||||||
|
case 0xc9: /* parameter out of range */
|
||||||
|
case 0xcc: /* invalid data field in request */
|
||||||
|
|
||||||
|
/* these completion codes usually mean parameter not supported */
|
||||||
|
lprintf(LOG_INFO, "Get LAN Parameter '%s' command failed: %s",
|
||||||
|
p->desc, val2str(rsp->ccode, completion_code_vals));
|
||||||
p->data = NULL;
|
p->data = NULL;
|
||||||
p->data_len = 0;
|
p->data_len = 0;
|
||||||
return p;
|
return p;
|
||||||
}
|
|
||||||
if (rsp->ccode == 0xc9) {
|
default:
|
||||||
/* parameter out of range
|
|
||||||
* return lan_param without data
|
/* other completion codes are treated as error */
|
||||||
*/
|
lprintf(LOG_INFO, "Get LAN Parameter '%s' command failed: %s",
|
||||||
p->data = NULL;
|
p->desc, val2str(rsp->ccode, completion_code_vals));
|
||||||
p->data_len = 0;
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
lprintf(LOG_INFO, "Get LAN Parameter command failed: %s",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user