mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
added session command, and modified help output (only -h is used)
This commit is contained in:
parent
6e7b8f1af8
commit
4168b3c939
@ -56,6 +56,7 @@
|
||||
#include <ipmitool/ipmi_bmc.h>
|
||||
#include <ipmitool/ipmi_sensor.h>
|
||||
#include <ipmitool/ipmi_channel.h>
|
||||
#include <ipmitool/ipmi_session.h>
|
||||
#include <ipmitool/ipmi_event.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -86,6 +87,9 @@ void usage(void)
|
||||
printf(" -P password Remote password\n");
|
||||
printf(" -L level Session privilege level [default=USER]\n");
|
||||
printf(" -I intf Inteface to use\n");
|
||||
printf("\n");
|
||||
printf("\nCommands: bmc, chassis, event, fru, lan, raw, "
|
||||
"sdr, sel, sensor, sol, channel, session\n\n");
|
||||
printf("\n\n");
|
||||
}
|
||||
|
||||
@ -151,6 +155,7 @@ int ipmi_raw_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
int (*submain)(struct ipmi_intf *, int, char **);
|
||||
@ -247,13 +252,6 @@ int main(int argc, char ** argv)
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
if (!strncmp(argv[optind], "help", 4)) {
|
||||
usage();
|
||||
printf("\nCommands: bmc, chassis, event, fru, lan, raw, "
|
||||
"sdr, sel, sensor, sol, channel\n\n");
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
/* load interface */
|
||||
if (intfarg) {
|
||||
intf = ipmi_intf_load(intfname);
|
||||
@ -313,6 +311,9 @@ int main(int argc, char ** argv)
|
||||
else if (!strncmp(argv[optind], "channel", 7)) {
|
||||
submain = ipmi_channel_main;
|
||||
}
|
||||
else if (!strncmp(argv[optind], "session", 7)) {
|
||||
submain = ipmi_session_main;
|
||||
}
|
||||
else {
|
||||
printf("Invalid comand: %s\n", argv[optind]);
|
||||
rc = -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user