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