summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog18
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac2
-rw-r--r--debpkg/changelog12
-rw-r--r--doc/Makefile6
-rw-r--r--doc/UserGuide2
-rw-r--r--doc/ipmiutil.spec2
-rw-r--r--lib/Makefile6
-rw-r--r--lib/lanplus/Makefile.am2
-rw-r--r--lib/lanplus/Makefile.in5
-rw-r--r--lib/libipmiutil.pc2
-rw-r--r--scripts/Makefile6
-rwxr-xr-xsetver2
-rw-r--r--util/ievents.c2
-rw-r--r--util/ipmicmd.h4
-rw-r--r--util/ipmiutil.c2
-rw-r--r--util/ireset.c102
-rw-r--r--util/isol.c8
18 files changed, 145 insertions, 58 deletions
diff --git a/ChangeLog b/ChangeLog
index 6fa5304..951aa47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4439,12 +4439,24 @@ wdt.8 iwdt.8 (ipmiutil wdt)
util/oem_dell.c - fix macos compile error with vFlashstr typedef
util/idiscover.c - detect if IP address
-01/08/2025 ARCress ipmiutil-3.2.1-1
- Makefile.am - SF Feat#10: change TMPDIR to TEMPDIR
+01/10/2025 ARCress ipmiutil-3.2.1-1 (for Linux build issues)
util/imbapi.c - GH21: ipmi_cmdraw_ia(% int sdata %)
util/ipmiutil.h - GH21: define BYTE for LTO issue
util/imb_api.h - GH21: define uchar for LTO issue
util/itsol.h - GH21: lan_keepalive( uchar type), open_sockfd(int port)
util/isol.c - GH21: lan_keepalive( uchar type)
util/isensor.c - GH21: GetSensorType( uchar snum ...)
- util/ievents.c - GH21: get_unit_type( uchar iunit ...), GetSensorType(uchar)
+ util/ievents.c - GH21: get_unit_type( uchar iunit ...)
+ Makefile.am - SF Feat#10: change TMPDIR to TEMPDIR
+ lib/lanplus/Makefile.am - SF Feat#11: add -lcrypto
+
+05/01/2025 ARCress ipmiutil-3.2.1-2 (for WinPE/64 openssl issue #23)
+ ssleay32.dll - GH23: new version from https://indy.fulgan.com/SSL/openssl-1.0.2u-x64_86-win64.zip
+ libeay32.dll - GH23: new version from https://indy.fulgan.com/SSL/openssl-1.0.2u-x64_86-win64.zip
+
+01/31/2026 ARCress ipmiutil-3.2.2-1 changes (iver 3.22)
+ util/ireset.c - SR62: reset: interpret -e as modifier, not target (S Magnani)
+ SR63: make_dash_u_and_boot_target_order_invariant (S Magnani)
+ SR64: support_logical_instance_specification (S Magnani)
+ util/ipmicmd.c- SR64: support_logical_instance_specification (S Magnani)
+ util/isol.c - added WIN32_LEAN_AND_MEAN
diff --git a/configure b/configure
index 6a48b90..bbcc20a 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for ipmiutil 3.2.1.
+# Generated by GNU Autoconf 2.63 for ipmiutil 3.2.2.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -743,8 +743,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='ipmiutil'
PACKAGE_TARNAME='ipmiutil'
-PACKAGE_VERSION='3.2.1'
-PACKAGE_STRING='ipmiutil 3.2.1'
+PACKAGE_VERSION='3.2.2'
+PACKAGE_STRING='ipmiutil 3.2.2'
PACKAGE_BUGREPORT=''
ac_unique_file="util/ipmiutil.c"
@@ -1504,7 +1504,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ipmiutil 3.2.1 to adapt to many kinds of systems.
+\`configure' configures ipmiutil 3.2.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1574,7 +1574,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ipmiutil 3.2.1:";;
+ short | recursive ) echo "Configuration of ipmiutil 3.2.2:";;
esac
cat <<\_ACEOF
@@ -1685,7 +1685,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ipmiutil configure 3.2.1
+ipmiutil configure 3.2.2
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1699,7 +1699,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ipmiutil $as_me 3.2.1, which was
+It was created by ipmiutil $as_me 3.2.2, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2553,7 +2553,7 @@ fi
# Define the identity of the package.
PACKAGE='ipmiutil'
- VERSION='3.2.1'
+ VERSION='3.2.2'
cat >>confdefs.h <<_ACEOF
@@ -13983,7 +13983,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ipmiutil $as_me 3.2.1, which was
+This file was extended by ipmiutil $as_me 3.2.2, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14046,7 +14046,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-ipmiutil config.status 3.2.1
+ipmiutil config.status 3.2.2
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index e415162..1e14ac6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(ipmiutil,3.2.1)
+AC_INIT(ipmiutil,3.2.2)
AC_CONFIG_SRCDIR(util/ipmiutil.c)
echo "ipmiutil version ${PACKAGE_VERSION}"
AC_CONFIG_HEADERS(config.h)
diff --git a/debpkg/changelog b/debpkg/changelog
index e8c9c00..9c0f29a 100644
--- a/debpkg/changelog
+++ b/debpkg/changelog
@@ -1,3 +1,15 @@
+ipmiutil (3.2.2-1) unstable; urgency=low
+
+ * New upstream version.
+
+ -- Andy Cress <arcress@users.sourceforge.net> Sat, 31 Jan 2026 15:04:47 -0500
+
+ipmiutil (3.2.2-1) unstable; urgency=low
+
+ * New upstream version.
+
+ -- Andy Cress <arcress@users.sourceforge.net> Sat, 31 Jan 2026 15:04:19 -0500
+
ipmiutil (3.2.1-1) unstable; urgency=low
* New upstream version.
diff --git a/doc/Makefile b/doc/Makefile
index dd6a25d..7374635 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -113,9 +113,9 @@ OTOOL64 =
PACKAGE = ipmiutil
PACKAGE_BUGREPORT =
PACKAGE_NAME = ipmiutil
-PACKAGE_STRING = ipmiutil 3.2.1
+PACKAGE_STRING = ipmiutil 3.2.2
PACKAGE_TARNAME = ipmiutil
-PACKAGE_VERSION = 3.2.1
+PACKAGE_VERSION = 3.2.2
PATH_SEPARATOR = :
PKG_DIR = /root/rpmbuild
RANLIB = ranlib
@@ -127,7 +127,7 @@ SHR_LINK = libipmiutil.so.1
STRIP = strip
SUBDIR_S = scripts lib util doc
SYSTEMD_DIR = /usr/share/ipmiutil
-VERSION = 3.2.1
+VERSION = 3.2.2
abs_builddir = /root/ipmiutil/src/doc
abs_srcdir = /root/ipmiutil/src/doc
abs_top_builddir = /root/ipmiutil/src
diff --git a/doc/UserGuide b/doc/UserGuide
index 9ee0555..7cda612 100644
--- a/doc/UserGuide
+++ b/doc/UserGuide
@@ -1,6 +1,6 @@
IPMIUTIL USER GUIDE
- VERSION 3.2.1
+ VERSION 3.2.2
An easy-to-use IPMI server management utility
diff --git a/doc/ipmiutil.spec b/doc/ipmiutil.spec
index 2d9d4af..d9b3aab 100644
--- a/doc/ipmiutil.spec
+++ b/doc/ipmiutil.spec
@@ -3,7 +3,7 @@
# Copyright (c) 2012 Andy Cress
#
Name: ipmiutil
-Version: 3.2.1
+Version: 3.2.2
Release: 1%{?dist}
Summary: Easy-to-use IPMI server management utilities
License: BSD
diff --git a/lib/Makefile b/lib/Makefile
index 6a56bf7..65016d7 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -115,9 +115,9 @@ OTOOL64 =
PACKAGE = ipmiutil
PACKAGE_BUGREPORT =
PACKAGE_NAME = ipmiutil
-PACKAGE_STRING = ipmiutil 3.2.1
+PACKAGE_STRING = ipmiutil 3.2.2
PACKAGE_TARNAME = ipmiutil
-PACKAGE_VERSION = 3.2.1
+PACKAGE_VERSION = 3.2.2
PATH_SEPARATOR = :
PKG_DIR = /root/rpmbuild
RANLIB = ranlib
@@ -129,7 +129,7 @@ SHR_LINK = libipmiutil.so.1
STRIP = strip
SUBDIR_S = scripts lib util doc
SYSTEMD_DIR = /usr/share/ipmiutil
-VERSION = 3.2.1
+VERSION = 3.2.2
abs_builddir = /root/ipmiutil/src/lib
abs_srcdir = /root/ipmiutil/src/lib
abs_top_builddir = /root/ipmiutil/src
diff --git a/lib/lanplus/Makefile.am b/lib/lanplus/Makefile.am
index 99eaf7f..94ae3ca 100644
--- a/lib/lanplus/Makefile.am
+++ b/lib/lanplus/Makefile.am
@@ -20,7 +20,7 @@ libipmi_lanplus_a_SOURCES = lanplus.c lanplus.h rmcp.h asf.h \
lib_LTLIBRARIES =
# lib_LTLIBRARIES = libipmi_lanplus.la
-libipmi_lanplus_la_LIBADD = -lcrypto
+# libipmi_lanplus_la_LIBADD = -lcrypto
# libipmi_lanplus_la_SOURCES = lanplus.c lanplus.h rmcp.h asf.h \
# lanplus_dump.c lanplus_dump.h \
diff --git a/lib/lanplus/Makefile.in b/lib/lanplus/Makefile.in
index a83287d..e09f0ab 100644
--- a/lib/lanplus/Makefile.in
+++ b/lib/lanplus/Makefile.in
@@ -246,8 +246,6 @@ libipmi_lanplus_a_SOURCES = lanplus.c lanplus.h rmcp.h asf.h \
helper.c ipmi_strings.c
lib_LTLIBRARIES =
-# lib_LTLIBRARIES = libipmi_lanplus.la
-libipmi_lanplus_la_LIBADD = -lcrypto
all: all-am
.SUFFIXES:
@@ -560,6 +558,9 @@ uninstall-am: uninstall-libLTLIBRARIES
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-libLTLIBRARIES
+# lib_LTLIBRARIES = libipmi_lanplus.la
+
+# libipmi_lanplus_la_LIBADD = -lcrypto
# libipmi_lanplus_la_SOURCES = lanplus.c lanplus.h rmcp.h asf.h \
# lanplus_dump.c lanplus_dump.h \
diff --git a/lib/libipmiutil.pc b/lib/libipmiutil.pc
index 71b3b13..aa88280 100644
--- a/lib/libipmiutil.pc
+++ b/lib/libipmiutil.pc
@@ -8,6 +8,6 @@ nutuser=@RUN_AS_USER@
Name: libipmiutil
Description: Library for ipmiutil
-Version: 3.2.1
+Version: 3.2.2
Libs: -L${libdir} -lipmi_lanplus
Cflags: -I${includedir}
diff --git a/scripts/Makefile b/scripts/Makefile
index 52bc8f5..c0f78f5 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -113,9 +113,9 @@ OTOOL64 =
PACKAGE = ipmiutil
PACKAGE_BUGREPORT =
PACKAGE_NAME = ipmiutil
-PACKAGE_STRING = ipmiutil 3.2.1
+PACKAGE_STRING = ipmiutil 3.2.2
PACKAGE_TARNAME = ipmiutil
-PACKAGE_VERSION = 3.2.1
+PACKAGE_VERSION = 3.2.2
PATH_SEPARATOR = :
PKG_DIR = /root/rpmbuild
RANLIB = ranlib
@@ -127,7 +127,7 @@ SHR_LINK = libipmiutil.so.1
STRIP = strip
SUBDIR_S = scripts lib util doc
SYSTEMD_DIR = /usr/share/ipmiutil
-VERSION = 3.2.1
+VERSION = 3.2.2
abs_builddir = /root/ipmiutil/src/scripts
abs_srcdir = /root/ipmiutil/src/scripts
abs_top_builddir = /root/ipmiutil/src
diff --git a/setver b/setver
index 3e53337..649b007 100755
--- a/setver
+++ b/setver
@@ -6,7 +6,7 @@
# [doinc?] is 'n'.
# if [doinc?] is 'r', reverse increment (decrement).
#
-ver=3.2.1
+ver=3.2.2
rel=1
tmped=/tmp/edver.tmp
tmpspec=/tmp/edspec.tmp
diff --git a/util/ievents.c b/util/ievents.c
index d9e9054..39afa5b 100644
--- a/util/ievents.c
+++ b/util/ievents.c
@@ -80,7 +80,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern char *progver; /*from ipmiutil.c*/
static char * progname = "ipmiutil events";
#else
-static char *progver = "3.21";
+static char *progver = "3.22";
static char *progname = "ievents";
#endif
static char fsensdesc = 0; /* 1= get extended sensor descriptions*/
diff --git a/util/ipmicmd.h b/util/ipmicmd.h
index 8d45c4c..bb0992e 100644
--- a/util/ipmicmd.h
+++ b/util/ipmicmd.h
@@ -195,6 +195,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define PICMG_GET_LED_STATE 0x08
#define PICMG_ID 0x00
+/* Table 28-14 Boot Option Parameters, boot flags, data 5 */
+#define MAX_LOGICAL_INSTANCE 15
+#define INTERNAL_INSTANCE_FLAG 0x10
+
/* structure used by ipmi_cmd(), not used by ipmi_cmdraw */
#define NCMDS 62
typedef struct {
diff --git a/util/ipmiutil.c b/util/ipmiutil.c
index 09a7fc8..dd3a2d9 100644
--- a/util/ipmiutil.c
+++ b/util/ipmiutil.c
@@ -57,7 +57,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ipmiutil.h"
static char *progname = "ipmiutil";
-char *progver = "3.21";
+char *progver = "3.22";
// static char fdebug = 0;
/*int ipmiutil(int argc, char **argv); */
diff --git a/util/ireset.c b/util/ireset.c
index d311142..10b54ed 100644
--- a/util/ireset.c
+++ b/util/ireset.c
@@ -32,6 +32,7 @@
* 09/18/06 Andy Cress 1.20 allow more platforms to do soft reset, and
* if Tyan, ignore set boot options errors.
* 01/10/07 Andy Cress 1.25 added reset_str(), modify initchar (6) if -o.
+ * 01/31/26 Andy Cress 2.21 SR62:interpret -e as modifier, not target (SMagnani)
*/
/*M*
Copyright (c) 2009 Kontron America, Inc.
@@ -199,7 +200,7 @@ static int set_wdt(uchar val, uchar act)
return(ret);
} /*end set_wdt()*/
-char *reset_str(uchar breset, uchar bopt)
+char *reset_str(uchar breset)
{
char *str;
switch(breset) {
@@ -213,20 +214,37 @@ char *reset_str(uchar breset, uchar bopt)
case 7: str = "cold reset BMC"; break;
default: str = "resetting"; break;
}
+ return(str);
+}
+
+const char *target_str(uchar bopt)
+{
+ char *str = "";
if (bopt > 0)
switch(bopt) {
- case 1: str = "resetting to Svc partition"; break;
- case 2: str = "resetting to EFI"; break;
- case 3: str = "resetting to PXE"; break;
- case 4: str = "resetting to CDROM"; break;
- case 5: str = "resetting to hard disk"; break;
- case 6: str = "resetting to BIOS Setup"; break;
- case 7: str = "resetting to floppy"; break;
- default: str = "resetting"; break;
+ case 1: str = " to Svc partition"; break;
+ case 2: str = " to EFI"; break;
+ case 3: str = " to PXE"; break;
+ case 4: str = " to CDROM"; break;
+ case 5: str = " to hard disk"; break;
+ case 6: str = " to BIOS Setup"; break;
+ case 7: str = " to floppy"; break;
+ default: break;
}
return(str);
}
+const char *instance_str(int instance)
+{
+ static char str[16] = { '\0' };
+ if (instance > 0)
+ {
+ snprintf(str, sizeof(str), " %d", instance);
+ }
+
+ return str;
+}
+
int set_boot_init_string(char *istr)
{
int rv = 0;
@@ -261,7 +279,7 @@ int set_boot_init_string(char *istr)
return(rv);
}
-static int IPMI_Reset(uchar bpower, uchar bootopt)
+static int IPMI_Reset(uchar bpower, uchar bootopt, uchar bEfiboot, int internal_instance)
{
uchar responseData[MAX_BUFFER_SIZE];
int responseLength = MAX_BUFFER_SIZE;
@@ -296,7 +314,7 @@ static int IPMI_Reset(uchar bpower, uchar bootopt)
if (fpersist)
inputData[1] = 0xC0; // valid flags, persistent
else inputData[1] = 0x80; // valid flags, next boot only
- if (bootopt == 2) inputData[1] |= 0x20; // add boot to EFI
+ if (bEfiboot) inputData[1] |= 0x20; // add boot to EFI (modifier)
if (bootopt == 1) inputData[2] = 0x10; // boot to svc partition
else if (bootopt == 3) inputData[2] = 0x04; // boot to PXE
else if (bootopt == 4) inputData[2] = 0x14; // boot to CDROM
@@ -307,7 +325,8 @@ static int IPMI_Reset(uchar bpower, uchar bootopt)
else inputData[2] = 0x00; // normal boot
inputData[3] = gbootparm;
inputData[4] = 0x00; //no overrides
- inputData[5] = 0x00; //
+ inputData[5] = internal_instance ? (INTERNAL_INSTANCE_FLAG | internal_instance)
+ : 0x00;
responseLength = MAX_BUFFER_SIZE;
status = ipmi_cmd_mc(SET_BOOT_OPTIONS, inputData, 6, responseData,
&responseLength, &completionCode, fdebug);
@@ -402,7 +421,8 @@ static int IPMI_Reset(uchar bpower, uchar bootopt)
/* 4 = NMI interrupt, 5 = soft shutdown OS via ACPI */
if (bpower > 5) bpower = 5; /* if invalid, try shutdown */
if (!fipmilan) { /*only write to syslog if local*/
- sprintf(initmsg,"%s: chassis %s\n",progname,reset_str(bpower,bootopt));
+ sprintf(initmsg,"%s: chassis %s%s%s%s\n",progname,reset_str(bpower), target_str(bootopt),
+ instance_str(internal_instance), bEfiboot ? " (EFI)" : "");
write_syslog(initmsg);
}
inputData[0] = bpower; // chassis control reset
@@ -476,13 +496,14 @@ static void show_usage(void)
printf(" -k do Cold Reset of the BMC firmware\n");
printf(" -i<str> set boot Initiator mailbox string\n");
printf(" -j<num> set IANA number for boot Initiator\n");
+ printf(" -l<num> select internal Logical instance to boot\n");
printf(" -n sends NMI to the system\n");
printf(" -o soft-shutdown OS and reset\n");
printf(" -r hard Resets the system\n");
printf(" -u powers Up the system\n");
printf(" -m002000 specific MC (bus 00,sa 20,lun 00)\n");
printf(" -b reboots to BIOS Setup\n");
- printf(" -e reboots to EFI\n");
+ printf(" -e modifier: interpret 'reboot to' as an EFI target\n");
printf(" -f reboots to Floppy/Removable\n");
printf(" -h reboots to Hard Disk\n");
printf(" -p reboots to PXE via network\n");
@@ -494,6 +515,22 @@ static void show_usage(void)
print_lan_opt_usage(0);
}
+void parse_boot_device(int c, uchar* breset, uchar* bopt)
+{
+ switch(c) {
+ case 's': *bopt = 1; break; /* hard reset to svc part */
+ case 'p': *bopt = 3; break; /* hard reset to PXE */
+ case 'v': *bopt = 4; break; /* hard reset to DVD/CD Media*/
+ case 'h': *bopt = 5; break; /* hard reset to Hard Disk */
+ case 'b': *bopt = 6; break; /* hard reset to BIOS Setup */
+ case 'f': *bopt = 7; break; /* hard reset to floppy/remov*/
+ }
+
+ // This allows use of a boot device with -u and -c
+ if (*breset == INIT_VAL)
+ *breset = 3;
+}
+
#ifdef METACOMMAND
int i_reset(int argc, char **argv)
#else
@@ -516,8 +553,10 @@ main(int argc, char **argv)
uchar rsdata[32];
int rslen;
int mfg = 0;
+ int internal_instance = 0;
uchar cc;
char *s1;
+ uchar bEfiboot = 0;
#if defined (EFI)
InitializeLib(_LIBC_EFIImageHandle, _LIBC_EFISystemTable);
@@ -529,7 +568,7 @@ main(int argc, char **argv)
/* Request admin privilege by default, since power control requires it. */
parse_lan_options('V',"4",0);
- while ((c = getopt(argc,argv,"bcdDefhi:j:km:noprsuvwyT:V:J:YEF:N:P:R:U:Z:x?")) != EOF)
+ while ((c = getopt(argc,argv,"bcdDefhi:j:kl:m:noprsuvwyT:V:J:YEF:N:P:R:U:Z:x?")) != EOF)
switch(c) {
case 'd': breset = 0; break; /* power down */
case 'u': breset = 1; break; /* power up */
@@ -538,13 +577,17 @@ main(int argc, char **argv)
case 'D': breset = 6; fshutdown = 1; break; /*soft shutdown,pwrdown*/
case 'n': breset = 4; break; /* interrupt (NMI) */
case 'r': breset = 3; break; /* hard reset */
- case 's': breset = 3; bopt = 1; break; /* hard reset to svc part */
- case 'e': breset = 3; bopt = 2; break; /* hard reset to EFI */
- case 'p': breset = 3; bopt = 3; break; /* hard reset to PXE */
- case 'v': breset = 3; bopt = 4; break; /* hard reset to DVD/CD Media*/
- case 'h': breset = 3; bopt = 5; break; /* hard reset to Hard Disk */
- case 'b': breset = 3; bopt = 6; break; /* hard reset to BIOS Setup */
- case 'f': breset = 3; bopt = 7; break; /* hard reset to floppy/remov*/
+ case 'e': bEfiboot = 1; break; /* Perform EFI boot (instead of legacy/"PC compatible" boot) */
+
+ case 's': /* hard reset to svc part */
+ case 'p': /* hard reset to PXE */
+ case 'v': /* hard reset to DVD/CD Media*/
+ case 'h': /* hard reset to Hard Disk */
+ case 'b': /* hard reset to BIOS Setup */
+ case 'f': /* hard reset to floppy/remov*/
+ parse_boot_device(c, &breset, &bopt);
+ break;
+
case 'i': if (strlen(optarg) < MAX_INIT) initstr = optarg; break;
case 'j': mfg = atoi(optarg); /*IANA number*/
iana[0] = ((mfg & 0xFF0000) >> 16);
@@ -552,6 +595,7 @@ main(int argc, char **argv)
iana[2] = (mfg & 0x0000FF);
break;
case 'k': breset = 7; break; /* cold reset to BMC */
+ case 'l': internal_instance = atoi(optarg); break; /* internal boot device instance number */
case 'w': fwait = 1; break; /* wait for ready */
case 'y': fpersist = 1; break; /* yes, persist boot options */
case 'm': /* specific MC, 3-byte address, e.g. "409600" */
@@ -592,6 +636,13 @@ main(int argc, char **argv)
goto do_exit;
}
+ if ( (internal_instance < 0)
+ || (internal_instance > MAX_LOGICAL_INSTANCE)) {
+ printf("Please specify an instance number between 0 and %d\n", MAX_LOGICAL_INSTANCE);
+ ret = ERR_BAD_PARAM;
+ goto do_exit;
+ }
+
fipmilan = is_remote();
/*
* Check the Device ID to determine the platform type.
@@ -680,7 +731,7 @@ main(int argc, char **argv)
}
if (breset == 7) { /*do Cold Reset to BMC */
- printf("%s: %s ...\n",progname,reset_str(breset,bopt));
+ printf("%s: %s ...\n",progname,reset_str(breset));
rslen = sizeof(rsdata);
ret = ipmi_cmdraw( 0x02, NETFN_APP, g_sa, g_bus, g_lun,
rqdata,0, rsdata, &rslen, &cc, fdebug);
@@ -734,8 +785,9 @@ main(int argc, char **argv)
else printf("ipmilan async bridge agent not present\n");
ipmi_close_();
} else {
- printf("%s: %s ...\n",progname,reset_str(breset,bopt));
- ret = IPMI_Reset(breset,bopt);
+ printf("%s: %s%s%s%s ...\n",progname,reset_str(breset), target_str(bopt),
+ instance_str(internal_instance), bEfiboot ? " (EFI)" : "");
+ ret = IPMI_Reset(breset, bopt, bEfiboot, internal_instance);
if (ret == 0) { /* if ok */
printf("%s: IPMI_Reset ok\n",progname);
/* It starts resetting by this point, so do not close. */
diff --git a/util/isol.c b/util/isol.c
index 447945b..a65fbc2 100644
--- a/util/isol.c
+++ b/util/isol.c
@@ -19,6 +19,7 @@
* 05/24/07 Andy Cress - Fix Enter key confusion in BIOS Setup (use CR+LF)
* 06/15/07 Andy Cress - More fixes to Windows translation (fUseWinCon)
* 08/20/07 Andy Cress - moved Windows translation to isolwin.c
+ * 01/31/26 Andy Cress - added WIN32_LEAN_AND_MEAN
* See ChangeLog for further changes
*
* NOTE: There are a few other options for Serial-Over-LAN console
@@ -73,10 +74,15 @@ int i_sol(int argc, char **argv)
/* All other OSs: Linux, Windows, Solaris, BSD */
#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#ifdef HAVE_IPV6
+#include <winsock2.h>
+#else
+#include <winsock.h>
+#endif
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
-#include <winsock.h>
#include <io.h>
#include "getopt.h"
#else