ipmi lan print return code issue #357
Unanswered
Richard660927
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I used the latest code to test my BMC. The lan print command return exit code 1 if the get lan parameter is unsupported. I found the lan print code would return NULL. This return value would let our testing script return fail.
---------------------------------lib/ipmi_lanp.c-----------------------------------
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));
+ / We treat them as valid but empty response /
p->data = NULL;
p->data_len = 0;
- return p;
-
+ rc = p;
+ / fall through /
default:
-
/ other completion codes are treated as error */
lprintf(LOG_INFO, "Get LAN Parameter '%s' command failed: %s",
- p->desc, val2str(rsp->ccode, completion_code_vals));
+ p->desc,
+ specific_val2str(rsp->ccode,
+ get_lan_cc_vals,
+ completion_code_vals));
return NULL;
}
Should the code change to "return rc" not "return NULL"?
Beta Was this translation helpful? Give feedback.
All reactions