summaryrefslogtreecommitdiff
path: root/util/ipmicmd.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-08-01 11:11:08 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-08-01 11:11:08 +0200
commit9bf6d68108836bfbcc5296a50a48cfd6af9151b7 (patch)
tree5ca1eaee950d12ed2316893d6eef48ebd7258d28 /util/ipmicmd.c
parentcf37726b789ff5344c5ad376cee1fb99459e5785 (diff)
New upstream version 3.1.2upstream/3.1.2
Diffstat (limited to 'util/ipmicmd.c')
-rw-r--r--util/ipmicmd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/util/ipmicmd.c b/util/ipmicmd.c
index b7c8a5f..f8ce1ba 100644
--- a/util/ipmicmd.c
+++ b/util/ipmicmd.c
@@ -90,6 +90,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#include "ipmicmd.h" /* has NCMDS, ipmi_cmd_t */
+#include "ipmilan2.h" /*includes ipmilan.h also*/
ipmi_cmd_t ipmi_cmds[NCMDS] = { /*if add here, also change NCMDS in ipmicmd.h*/
{/*empty,temp*/ 0, BMC_SA, PUBLIC_BUS, NETFN_APP, BMC_LUN, 0, 20},
@@ -164,7 +165,6 @@ int ipmi_cmdraw_efi( uchar cmd, uchar netfn, uchar lun, uchar sa,
uchar *presp, int *sresp, uchar *pcc, char fdebugcmd);
#else
-#include "ipmilan2.h" /*includes ipmilan.h also*/
#ifdef WIN32
extern int ipmi_cmdraw_ia( uchar cmd, uchar netfn, uchar lun, uchar sa,
uchar bus, uchar *pdata, int sdata,
@@ -1453,13 +1453,12 @@ char *get_nodename(void)
return(gnode);
}
-extern int lasterr; /*defined in ipmilan.c */
-extern void show_LastError(char *tag, int err);
-
void show_outcome(char *prog, int ret)
{
+ int err = 0;
if (prog == NULL) prog = "";
- if (ret == -1 && lasterr != 0) show_LastError(prog,lasterr);
+ err = get_LastError();
+ if (ret == -1 && err != 0) show_LastError(prog,err);
printf("%s%c %s\n",prog,bcomma,decode_rv(ret));
}