mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
ID: 3587913 - Command % ipmitool raw help; returns 1
Commit fixes % ipmitool raw help; return code which should be 0.
This commit is contained in:
parent
7973f44304
commit
a5384fa12e
@ -300,6 +300,18 @@ ipmi_rawi2c_main(struct ipmi_intf * intf, int argc, char ** argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ipmi_raw_help() - print 'raw' help text
|
||||||
|
*
|
||||||
|
* returns void
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
ipmi_raw_help()
|
||||||
|
{
|
||||||
|
lprintf(LOG_NOTICE, "RAW Commands: raw <netfn> <cmd> [data]");
|
||||||
|
print_valstr(ipmi_netfn_vals, "Network Function Codes", LOG_NOTICE);
|
||||||
|
lprintf(LOG_NOTICE, "(can also use raw hex values)");
|
||||||
|
} /* ipmi_raw_help() */
|
||||||
|
|
||||||
int
|
int
|
||||||
ipmi_raw_main(struct ipmi_intf * intf, int argc, char ** argv)
|
ipmi_raw_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||||
{
|
{
|
||||||
@ -310,11 +322,14 @@ ipmi_raw_main(struct ipmi_intf * intf, int argc, char ** argv)
|
|||||||
int i;
|
int i;
|
||||||
uint8_t data[256];
|
uint8_t data[256];
|
||||||
|
|
||||||
if (argc < 2 || strncmp(argv[0], "help", 4) == 0) {
|
if (argc == 1 && strncmp(argv[0], "help", 4) == 0) {
|
||||||
lprintf(LOG_NOTICE, "RAW Commands: raw <netfn> <cmd> [data]");
|
ipmi_raw_help();
|
||||||
print_valstr(ipmi_netfn_vals, "Network Function Codes", LOG_NOTICE);
|
return 0;
|
||||||
lprintf(LOG_NOTICE, "(can also use raw hex values)");
|
}
|
||||||
return -1;
|
else if (argc < 2) {
|
||||||
|
lprintf(LOG_ERR, "Not enough parameters given.");
|
||||||
|
ipmi_raw_help();
|
||||||
|
return (-1);
|
||||||
}
|
}
|
||||||
else if (argc > sizeof(data))
|
else if (argc > sizeof(data))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user