2dface
From dfca464e5fe4c9107f08bff7e6e2730a504945b7 Mon Sep 17 00:00:00 2001
2dface
From: Boris Ranto <branto@redhat.com>
2dface
Date: Thu, 2 Jun 2016 12:47:22 +0200
2dface
Subject: [PATCH] Apply './OpenIPMI-2.0.19-man.patch'
2dface
2dface
Signed-off-by: Boris Ranto <branto@redhat.com>
2dface
---
2dface
 lanserv/ipmilan.8       | 13 ++++++++++---
2dface
 man/ipmi_cmdlang.7      | 36 ++++++++++++++++++------------------
2dface
 man/ipmi_ui.1           | 10 +++++-----
2dface
 man/openipmi_conparms.7 |  4 ++--
2dface
 man/openipmicmd.1       |  6 +++---
2dface
 man/openipmigui.1       | 12 ++++++------
2dface
 man/openipmish.1        | 12 +++++++++++-
2dface
 man/rmcp_ping.1         |  2 +-
2dface
 man/solterm.1           |  6 +++---
2dface
 sample/ipmicmd.c        |  1 +
2dface
 sample/rmcp_ping.c      |  5 +++++
2dface
 sample/solterm.c        |  7 ++++++-
2dface
 ui/basic_ui.c           | 25 +++++++++++++++++++++++++
2dface
 13 files changed, 96 insertions(+), 43 deletions(-)
2dface
2dface
diff --git a/lanserv/ipmilan.8 b/lanserv/ipmilan.8
2dface
index ff43d5c..9360507 100644
2dface
--- a/lanserv/ipmilan.8
2dface
+++ b/lanserv/ipmilan.8
2dface
@@ -29,18 +29,25 @@ address they came in.
2dface
 
2dface
 .SH OPTIONS
2dface
 .TP
2dface
-.BI \-c\  config-file
2dface
+\fB\-c\fR file,\ \fB\-\-config\-file\fR file
2dface
 Set the configuration file to one other than the default of
2dface
 .I "/etc/ipmi_lan.conf"
2dface
 .TP
2dface
-.B \-n
2dface
+\fB\-i\fR device,\ \fB\-\-ipmi-dev\fR device
2dface
+Sets the desired device
2dface
+.TP
2dface
+\fB\-n\fR,\ \fB\-\-daemonize\fR
2dface
 Stops  the  daemon  from  forking  and  detaching  from the controlling
2dface
 terminal. This is useful for running from init.
2dface
 .TP
2dface
-.B \-d
2dface
+\fB\-d\fR,\ \fB\-\-debug\fR
2dface
 Turns on debugging to standard output.  You generally have to use
2dface
 .B \-n
2dface
 with this.
2dface
+.TP
2dface
+\fB\-?\fR,\ \fB\-\-help\fR,\ \fB\-\-usage\fR
2dface
+Prints brief usage hints message.
2dface
+
2dface
 
2dface
 
2dface
 .SH CONFIGURATION
2dface
diff --git a/man/ipmi_cmdlang.7 b/man/ipmi_cmdlang.7
2dface
index 4d18e76..a6d73b9 100644
2dface
--- a/man/ipmi_cmdlang.7
2dface
+++ b/man/ipmi_cmdlang.7
2dface
@@ -246,7 +246,7 @@ instance, the command to create a domain is
2dface
 The command to list all sensors in a domain named domain1 is
2dface
 .B sensor list domain1.
2dface
 
2dface
-Each command has a reponse for each object operated on, which is
2dface
+Each command has a response for each object operated on, which is
2dface
 listed after the command description.  In those responses, anything
2dface
 that begins with a
2dface
 .B %
2dface
@@ -316,7 +316,7 @@ BMC.  For that, notice that the LAN connection has an options extra IP
2dface
 and port for the second IP address.  OpenIPMI supports these IP
2dface
 addresses and connection, detecting failures, switching between
2dface
 addresses, and other fault-tolerant things.  It does this
2dface
-transparently to the user.  Mutiple connections may require special
2dface
+transparently to the user.  Multiple connections may require special
2dface
 OEM support, read the documentation about your specific system if you
2dface
 need this.
2dface
 
2dface
@@ -336,7 +336,7 @@ or
2dface
 \fI<name>\fP and \fI<password>\fP are the user name and password of
2dface
 the IPMI user to use for the connection.
2dface
 The <smi num> is the driver number, generally 0.
2dface
-Options enable and disable various automitic processing and are:
2dface
+Options enable and disable various automatic processing and are:
2dface
 .PD 0
2dface
 .HP
2dface
 .B -[no]all
2dface
@@ -356,7 +356,7 @@ is false by default.
2dface
 is false by default.
2dface
 .HP
2dface
 .B -[no]ipmbscan
2dface
-- IPMB bus scanning.  This turns on scanning IPMB busses when they are found.
2dface
+- IPMB bus scanning.  This turns on scanning IPMB buses when they are found.
2dface
 This is false by default.
2dface
 .HP
2dface
 .B -[no]oeminit
2dface
@@ -461,7 +461,7 @@ available hacks are:
2dface
 The -M option sets the maximum outstanding messages.  The default is
2dface
 2, ranges 1-63.
2dface
 
2dface
-Options enable and disable various automitic processing and are:
2dface
+Options enable and disable various automatic processing and are:
2dface
 .PD 0
2dface
 .HP
2dface
 .B -[no]all
2dface
@@ -519,7 +519,7 @@ Domain Created: <domain>
2dface
 .RE
2dface
 
2dface
 .B fru <domain> <is_logical> <device_address> <device_id> <lun> <private_bus> <channel>
2dface
-- dump a fru given all it's insundry information.
2dface
+- dump a fru given all it's sundry information.
2dface
 .TP
2dface
 Response:
2dface
 .RS
2dface
@@ -533,7 +533,7 @@ Domain
2dface
 
2dface
 .B msg <domain> <channel> <ipmb> <LUN> <NetFN> <Cmd> [data...]
2dface
 - Send a command to the given IPMB address on the given channel and
2dface
-display the response.  Note that this does not require the existance
2dface
+display the response.  Note that this does not require the existence
2dface
 of an MC in OpenIPMI.
2dface
 .TP
2dface
 Response:
2dface
@@ -571,7 +571,7 @@ SEL Rescan done: <domain>
2dface
 .RE
2dface
 
2dface
 .B presence <domain>
2dface
-- Audit the presence of all enities in the domain.  Note that this just
2dface
+- Audit the presence of all entities in the domain.  Note that this just
2dface
 starts the process; it will run in the background.
2dface
 .TP
2dface
 Response is:
2dface
@@ -689,7 +689,7 @@ FRU deleted: <fru>
2dface
 - Set the value of a FRU element.  The
2dface
 name is the record name, or multi-record.  The number is required
2dface
 for fields that need it (custom and multi-record).  The value is
2dface
-an a single value for integers.  For strings it is a string
2dface
+a single value for integers.  For strings it is a string
2dface
 type (either binary, ascii, or unicode) and the info.  Binary and
2dface
 unicode data is specified as numbers.  ascii data is specified in
2dface
 a string.  Note that setting a ascii value with no string will
2dface
@@ -770,7 +770,7 @@ Domain
2dface
 .B info <entity>
2dface
 - Dump information about an entity.
2dface
 .TP
2dface
-Reponse:
2dface
+Response:
2dface
 .RS
2dface
 .nf
2dface
 Entity
2dface
@@ -784,7 +784,7 @@ Entity
2dface
 .B fru <entity>
2dface
 - Dump the FRU information about the given entity.
2dface
 .TP
2dface
-Reponse:
2dface
+Response:
2dface
 .RS
2dface
 .nf
2dface
 Entity
2dface
@@ -813,7 +813,7 @@ Entity
2dface
 .B set_act_time <entity>
2dface
 - Set the hot-swap auto-activate time.
2dface
 .TP
2dface
-Reponse:
2dface
+Response:
2dface
 .RS
2dface
 .nf
2dface
 Set act time: <entity>
2dface
@@ -981,7 +981,7 @@ Response:
2dface
 .nf
2dface
 Sensor
2dface
   Name: <sensor>
2dface
-  Positivie Hysteresis: <integer>
2dface
+  Positive Hysteresis: <integer>
2dface
   Negative Hysteresis: <integer>
2dface
 .fi
2dface
 .RE
2dface
@@ -1101,7 +1101,7 @@ Set done: <control>
2dface
 .RE
2dface
 
2dface
 .B get <control>
2dface
-- Get the value of a control.  The reponse depends
2dface
+- Get the value of a control.  The response depends
2dface
 on the control type.
2dface
 .TP
2dface
 Response:
2dface
@@ -1128,7 +1128,7 @@ multiple lights.  The options values (marked with
2dface
 ) will not be
2dface
 present if local control is set to true.  Local control means that
2dface
 the LED takes whatever default function it does on the device
2dface
-(like disk activity, ethernet activity, hot-swap LED, etc.).
2dface
+(like disk activity, Ethernet activity, hot-swap LED, etc.).
2dface
 Response for id control:
2dface
 .RS
2dface
 .nf
2dface
@@ -1325,7 +1325,7 @@ Channel Access
2dface
 - Set information about the MC's channel access.  There are two different
2dface
 places where this is stored, the present in-use values (volatile) and the
2dface
 non-volatile storage that is loaded at startup.  Note if you specify
2dface
-channel 0xe, the modified channel will be the current channel.  Parms
2dface
+channel 0xe, the modified channel will be the current channel.  Parameters
2dface
 are:
2dface
 .RS
2dface
 .nf
2dface
@@ -1547,7 +1547,7 @@ PET destroyed: <pet>
2dface
 .SS pef
2dface
 commands dealing with platform even filters.  These are basically
2dface
 connections to the PEF configuration parameters in an MC.  You use a
2dface
-pef to fetch a pef config, which you can then modify and write back to
2dface
+pef to fetch a pef configuration, which you can then modify and write back to
2dface
 the MC.  Note that when you get a pef config, you claim a lock on the
2dface
 MC that must be unlocked.
2dface
 
2dface
@@ -1780,7 +1780,7 @@ operational and finished all it SDR, FRU, and bus scans:
2dface
 .fi
2dface
 .RE
2dface
 
2dface
-The following comes out when domain connection infomration changes:
2dface
+The following comes out when domain connection information changes:
2dface
 .RS
2dface
 .nf
2dface
   EVENT
2dface
diff --git a/man/ipmi_ui.1 b/man/ipmi_ui.1
2dface
index 9c5d9b6..011255f 100644
2dface
--- a/man/ipmi_ui.1
2dface
+++ b/man/ipmi_ui.1
2dface
@@ -4,7 +4,7 @@
2dface
 ipmi_ui \- Crude interface to an IPMI system
2dface
 
2dface
 .SH SYNOPSIS
2dface
-.B ipmiui
2dface
+.B ipmi_ui
2dface
 .RB [\| \-dmsg \|]
2dface
 .RB [\| \-dmem \|]
2dface
 .RB [\| \-c \|]
2dface
@@ -34,7 +34,7 @@ Normally,
2dface
 starts up in a full-screen format.  The left window shows the output
2dface
 of commands, the right window shows the logs from OpenIPMI.  Both
2dface
 windows are scrollable with page up and page down keys, press the "\fBF1\fP"
2dface
-key to choose the the left window to scroll, the "\fBF2\fP" key to choose
2dface
+key to choose the left window to scroll, the "\fBF2\fP" key to choose
2dface
 the right window to scroll.
2dface
 
2dface
 Note that you must set your environment \fBTERM\fP variable properly for
2dface
@@ -48,7 +48,7 @@ the connections are to the same IPMI domain through different
2dface
 management controllers.  Also, each LAN connection may have two IP
2dface
 addresses.  These are two different addresses to the same management
2dface
 controller.  So you may have a total of 4 IP addresses to an IPMI
2dface
-domain, two management controllers and two IP adresses to each
2dface
+domain, two management controllers and two IP addresses to each
2dface
 management controller.
2dface
 
2dface
 .SH OPTIONS
2dface
@@ -174,12 +174,12 @@ turns events on or off from the sensor (\fB0\fP or \fB1\fP).
2dface
 turns scanning on or off for the sensor (\fB0\fP or \fB1\fP).
2dface
 .I "assertion-bitmask"
2dface
 specifies the bitmask of thresholds or states
2dface
-that should be enabled or disabled when a thrshold or state is
2dface
+that should be enabled or disabled when a threshold or state is
2dface
 asserted.  It is a bunch of 0's and 1's, where the first one is for
2dface
 threshold/state 0, the second for threshold/state 1, etc.
2dface
 .I "deassertion-bitmask"
2dface
 specifies the bitmask of thresholds or states
2dface
-that should be enabled or disabled when a thrshold or state is
2dface
+that should be enabled or disabled when a threshold or state is
2dface
 deasserted.
2dface
 
2dface
 .SH CONTROLS
2dface
diff --git a/man/openipmi_conparms.7 b/man/openipmi_conparms.7
2dface
index 587da2a..9dc6404 100644
2dface
--- a/man/openipmi_conparms.7
2dface
+++ b/man/openipmi_conparms.7
2dface
@@ -1,7 +1,7 @@
2dface
 .TH openipmi_conparms 7 05/13/03 OpenIPMI "Connection Parameters for OpenIPMI"
2dface
 
2dface
 .SH NAME
2dface
-openipmi_cmdparms \- Connection parmeters for OpenIPMI
2dface
+openipmi_cmdparms \- Connection parameters for OpenIPMI
2dface
 
2dface
 .SH SYNOPSIS
2dface
 
2dface
@@ -97,7 +97,7 @@ use.
2dface
 .TP
2dface
 .BI \-Rc\  confidentiality\ algorithm
2dface
 The \fIRMCP+ confidentiality (encryption) algorithm\fP to use.  This keeps
2dface
-evesdroppers from seeing the data.  Valid values are: \fBbmcpick\fP,
2dface
+eavesdroppers from seeing the data.  Valid values are: \fBbmcpick\fP,
2dface
 \fBaes_cbc_128\fP, \fBxrc4_128\fP, and \fBxrc_40\fP.  The \fBbmcpick\fP option is used by
2dface
 default, which means the BMC picks the algorithm it wants to use.
2dface
 
2dface
diff --git a/man/openipmicmd.1 b/man/openipmicmd.1
2dface
index 6bd2401..5d206d1 100644
2dface
--- a/man/openipmicmd.1
2dface
+++ b/man/openipmicmd.1
2dface
@@ -22,7 +22,7 @@ interfaces.
2dface
 Execute a single command an exit.
2dface
 
2dface
 .TP
2dface
-.BI <connection parms>
2dface
+.BI <connection\ parms>
2dface
 The parameters for the connection depend on the connection type.
2dface
 These are all described in openipmi_conparms (7)
2dface
 
2dface
@@ -32,7 +32,7 @@ Once up, you can execute commands in the user interface.  Note that
2dface
 commands and responses are asynchronous, you issue a command and the
2dface
 interface returns immediately.  When the response comes back, it will
2dface
 be dumped on your console.  That's a little strange looking, but IPMI
2dface
-is ansychronous underneath.  Note that the \fB\-k\fP option is synchronous,
2dface
+is asynchronous underneath.  Note that the \fB\-k\fP option is synchronous,
2dface
 it will wait for the response or a timeout before returning.
2dface
 
2dface
 .TP
2dface
@@ -82,7 +82,7 @@ Remove a command registration.
2dface
 .BR openipmi_conparms (7)
2dface
 
2dface
 .SH "KNOWN PROBLEMS"
2dface
-The asychronous nature of the program can be annoying.
2dface
+The asynchronous nature of the program can be annoying.
2dface
 
2dface
 .SH AUTHOR
2dface
 .PP
2dface
diff --git a/man/openipmigui.1 b/man/openipmigui.1
2dface
index 04f880b..0c8c10f 100644
2dface
--- a/man/openipmigui.1
2dface
+++ b/man/openipmigui.1
2dface
@@ -38,7 +38,7 @@ Turn on message debugging, this will dump all messages to debug log output.
2dface
 .TP
2dface
 .B \-\-drawmsg
2dface
 Turn on raw message debugging, this will dump all low-level messages to
2dface
-debug log output.  This differes from normal message debugging in that all
2dface
+debug log output.  This differs from normal message debugging in that all
2dface
 protocol messages are also dumped, not just IPMI messages.
2dface
 .TP
2dface
 .B \-\-dmem
2dface
@@ -81,7 +81,7 @@ tree.
2dface
 
2dface
 The tree window has a top-level list of all the domains for which
2dface
 OpenIPMI has connections (or pending connection).  Each domain
2dface
-exapands into domain-specific information and a list of entities and
2dface
+expands into domain-specific information and a list of entities and
2dface
 Management Controllers (MCs) for that domain.
2dface
 
2dface
 Right click drives most of the operations in the tree window.  Many
2dface
@@ -92,7 +92,7 @@ Color is used in the GUI to denote error status, and shading is used
2dface
 to denote availability.  If a sensor has an error, the tree entry for
2dface
 that sensor will change colors.  Black means no error, yellow means
2dface
 warning, red means critical, and blue means non-recoverable.  These
2dface
-errors propigate up, so the entity containing that sensor will be the
2dface
+errors propagate up, so the entity containing that sensor will be the
2dface
 same color as the most critical error for the sensors underneath it.
2dface
 The same goes for domain, it will be the same color as the most
2dface
 critical error for the entities underneath it.  This way, if you watch
2dface
@@ -146,7 +146,7 @@ that sensor.
2dface
 
2dface
 .SH CONTROLS
2dface
 
2dface
-Controls are available under the entity they belong to.  control
2dface
+Controls are available under the entity they belong to.  Control
2dface
 information is beyond the scope of this document, as IPMI controls are
2dface
 very complex.  See the IPMI document from OpenIPMI for information
2dface
 about controls.
2dface
@@ -214,7 +214,7 @@ channel listing.  Note that some user setting (the name and password)
2dface
 are global to all channels on the MC.
2dface
 
2dface
 Due to the IPMI spec and some unfortunate implementation bugs, some
2dface
-wierd issues exist with this information.  The user has an Enabled
2dface
+weird issues exist with this information.  The user has an Enabled
2dface
 value that tells whether the user is enabled or not.  When initially
2dface
 displayed, this field shows as a "?" because this field is not
2dface
 readable. It will displayed as the actual value when it is modified,
2dface
@@ -247,7 +247,7 @@ changed.
2dface
 .SH SOLPARMS
2dface
 
2dface
 In the channel display on a 8023_LAN channel, a LANPARM configuration
2dface
-command is available if the MC supporte SOL (Serial Over LAN).  This
2dface
+command is available if the MC supports SOL (Serial Over LAN).  This
2dface
 pulls up all the parameters for the LAN and allows them to be set.
2dface
 Right-clicking on an item allows it to be changed.
2dface
 
2dface
diff --git a/man/openipmish.1 b/man/openipmish.1
2dface
index 36b1e43..2c902e4 100644
2dface
--- a/man/openipmish.1
2dface
+++ b/man/openipmish.1
2dface
@@ -26,7 +26,7 @@ Turn on message debugging, this will dump all messages to debug log output.
2dface
 .TP
2dface
 .B \-\-drawmsg
2dface
 Turn on raw message debugging, this will dump all low-level messages to
2dface
-debug log output.  This differes from normal message debugging in that all
2dface
+debug log output.  This differs from normal message debugging in that all
2dface
 protocol messages are also dumped, not just IPMI messages.
2dface
 .TP
2dface
 .B \-\-dmem
2dface
@@ -34,11 +34,21 @@ Turn on memory debugging, this will cause memory allocation and
2dface
 deallocations to be checked.  When the program terminates, it will
2dface
 dump all memory that was not properly freed (leaked).
2dface
 .TP
2dface
+.B \-\-dmsgerr
2dface
+Turn on printing out low-level message errors.
2dface
+.TP
2dface
 .B \-\-dlock
2dface
 Turn on lock debugging, this will check lock operations to make sure
2dface
 that locks are help in all the proper places and make sure that locks
2dface
 are properly nested.
2dface
 .TP
2dface
+\fB-x\fR\ <string>,\ \fB\-\-execute\fR\ <string>
2dface
+Execute the given string at startup.  This may be entered multiple times
2dface
+for multiple commands.
2dface
+.TP
2dface
+.B \-\-glib
2dface
+Use glib for the OS handler.
2dface
+.TP
2dface
 .B \-\-snmp
2dface
 Enable the SNMP trap handler.
2dface
 .B openipmish
2dface
diff --git a/man/rmcp_ping.1 b/man/rmcp_ping.1
2dface
index d60019a..ce5cab0 100644
2dface
--- a/man/rmcp_ping.1
2dface
+++ b/man/rmcp_ping.1
2dface
@@ -38,7 +38,7 @@ starttag.  This is zero by default
2dface
 Turns on debugging to standard output.
2dface
 .TP
2dface
 .I destination
2dface
-The target address, default is the boradcast address (default 255.255.255.255)
2dface
+The target address, default is the broadcast address (default 255.255.255.255)
2dface
 
2dface
 .SH AUTHOR
2dface
 .PP
2dface
diff --git a/man/solterm.1 b/man/solterm.1
2dface
index 1479a1b..ada15d8 100644
2dface
--- a/man/solterm.1
2dface
+++ b/man/solterm.1
2dface
@@ -37,9 +37,9 @@ These are all described in openipmi_conparms (7)
2dface
 .TP
2dface
 .BI \-e\  escape_char
2dface
 The character to use to escape, or exit, the program.  Entering this
2dface
-chatacter right after a newline is entered causes the program to go
2dface
+character right after a newline is entered causes the program to go
2dface
 into command mode.  A single character after this performs a command.
2dface
-The default escape character is "~" as shown below.  Suppported
2dface
+The default escape character is "~" as shown below.  Supported
2dface
 commands are:
2dface
 .RS
2dface
 .IP ~.
2dface
@@ -98,7 +98,7 @@ the SoL session. This is the default.
2dface
 .TP
2dface
 .BI \-holdoff
2dface
 Specifies that CTS, DTR, and DSR are to be deasserted at the start of
2dface
-the SoL session so that the configuration may be modifeid before the
2dface
+the SoL session so that the configuration may be modified before the
2dface
 handshake is released.
2dface
 
2dface
 .TP
2dface
diff --git a/sample/ipmicmd.c b/sample/ipmicmd.c
2dface
index 6cbcdc5..5f5c1ec 100644
2dface
--- a/sample/ipmicmd.c
2dface
+++ b/sample/ipmicmd.c
2dface
@@ -124,6 +124,7 @@ void usage(void)
2dface
     printf("%s [-k <command>] [-v] <con_parms>\n", progname);
2dface
     printf("Where <con_parms> is one of:");
2dface
     ipmi_parse_args_iter_help(con_usage, NULL);
2dface
+    printf("\n");
2dface
 }
2dface
 
2dface
 char *
2dface
diff --git a/sample/rmcp_ping.c b/sample/rmcp_ping.c
2dface
index 7814792..5778fea 100644
2dface
--- a/sample/rmcp_ping.c
2dface
+++ b/sample/rmcp_ping.c
2dface
@@ -156,6 +156,11 @@ main(int argc, char *argv[])
2dface
 	if (strcmp(argv[i], "--") == 0) {
2dface
 	    i++;
2dface
 	    break;
2dface
+	} else if ((strcmp(argv[i], "--help") == 0) ||
2dface
+		   (strcmp(argv[i], "-?") == 0) ||
2dface
+		   (strcmp(argv[i], "-h") == 0)) {
2dface
+	    i++;
2dface
+	    usage();
2dface
 	} else if (strcmp(argv[i], "-p") == 0) {
2dface
 	    i++;
2dface
 	    if (i >= argc) {
2dface
diff --git a/sample/solterm.c b/sample/solterm.c
2dface
index 38a3f9d..a3e52de 100644
2dface
--- a/sample/solterm.c
2dface
+++ b/sample/solterm.c
2dface
@@ -743,7 +743,12 @@ int main(int argc, char *argv[])
2dface
 
2dface
 	/* Now we make sure "lan" is the first argument so we get the
2dface
 	   right connection type... */
2dface
-	if (strcmp(argv[1], "lan") != 0) {
2dface
+	if ((strcmp(argv[1], "-h") == 0) ||
2dface
+	    (strcmp(argv[1], "--help") == 0) ||
2dface
+	    (strcmp(argv[1], "-?") == 0)) {
2dface
+		usage();
2dface
+		exit(1);
2dface
+	} else if (strcmp(argv[1], "lan") != 0) {
2dface
 		fprintf(stderr, "main: %s only supports lan connections\n",
2dface
 			progname);
2dface
 		exit(1);
2dface
diff --git a/ui/basic_ui.c b/ui/basic_ui.c
2dface
index 6993eb2..84889cb 100644
2dface
--- a/ui/basic_ui.c
2dface
+++ b/ui/basic_ui.c
2dface
@@ -306,6 +306,26 @@ snmp_init(os_handler_t *os_hnd)
2dface
 static void snmp_setup_fds(os_handler_t *os_hnd) { }
2dface
 #endif /* HAVE_UCDSNMP */
2dface
     
2dface
+void help(void)
2dface
+{
2dface
+    fprintf(stdout, "ipmi_ui [ options ] smi smi-num\n");
2dface
+    fprintf(stdout, "ipmi_ui [ oprions ] lan IP port [IP2 port2] auth priv user pass\n");
2dface
+    fprintf(stdout, "\n");
2dface
+    fprintf(stdout, "Options:\n");
2dface
+    fprintf(stdout, "    -c       Command line mode\n");
2dface
+    fprintf(stdout, "    -dlock   Lock debugging ON\n");
2dface
+    fprintf(stdout, "    -dmem    Memory debugging ON\n");
2dface
+    fprintf(stdout, "    -drawmsg Raw message ON\n");
2dface
+    fprintf(stdout, "    -dmsg    Dump all messages.\n");
2dface
+#ifdef HAVE_UCDSNMP
2dface
+    fprintf(stdout, "    -snmp    SNMP trap handler ON\n");
2dface
+#endif
2dface
+    fprintf(stdout, "Auth:\n");
2dface
+    fprintf(stdout, "    none | straight | md5 | md2\n");
2dface
+    fprintf(stdout, "Priv:\n");
2dface
+    fprintf(stdout, "    callback | user | operator | admin\n");
2dface
+}
2dface
+
2dface
 int
2dface
 main(int argc, char *argv[])
2dface
 {
2dface
@@ -327,6 +347,11 @@ main(int argc, char *argv[])
2dface
 	curr_arg++;
2dface
 	if (strcmp(arg, "--") == 0) {
2dface
 	    break;
2dface
+	} else if (strcmp(arg, "-?") == 0 ||
2dface
+		   strcmp(arg, "-h") == 0 ||
2dface
+		   strcmp(arg, "--help") == 0) {
2dface
+	   help();
2dface
+	   return(1);
2dface
 	} else if (strcmp(arg, "-c") == 0) {
2dface
 	    full_screen = 0;
2dface
 	} else if (strcmp(arg, "-dlock") == 0) {
2dface
-- 
2dface
2.7.4
2dface