mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
ID: 3592770 - # ipmitool sdr list|elist INV_INPUT; return code
Commit fixes return code of # ipmitool sdr list|elist; when invalid input/unknown command is given. Return code is > 0 now and error message is printed.
This commit is contained in:
parent
6733b66a9c
commit
99e4ac0399
@ -4558,9 +4558,13 @@ ipmi_sdr_main(struct ipmi_intf *intf, int argc, char **argv)
|
|||||||
else if (strncmp(argv[1], "generic", 7) == 0)
|
else if (strncmp(argv[1], "generic", 7) == 0)
|
||||||
rc = ipmi_sdr_print_sdr(intf,
|
rc = ipmi_sdr_print_sdr(intf,
|
||||||
SDR_RECORD_TYPE_GENERIC_DEVICE_LOCATOR);
|
SDR_RECORD_TYPE_GENERIC_DEVICE_LOCATOR);
|
||||||
else
|
else {
|
||||||
lprintf(LOG_ERR,
|
lprintf(LOG_ERR, "Invalid SDR %s command: %s", argv[0], argv[1]);
|
||||||
"usage: sdr list [all|full|compact|event|mcloc|fru|generic]");
|
lprintf(LOG_NOTICE,
|
||||||
|
"usage: sdr %s [all|full|compact|event|mcloc|fru|generic]",
|
||||||
|
argv[0]);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
} else if (strncmp(argv[0], "type", 4) == 0) {
|
} else if (strncmp(argv[0], "type", 4) == 0) {
|
||||||
sdr_extended = 1;
|
sdr_extended = 1;
|
||||||
rc = ipmi_sdr_print_type(intf, argv[1]);
|
rc = ipmi_sdr_print_type(intf, argv[1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user