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