summaryrefslogtreecommitdiff
path: root/util/ipmicmd.c
diff options
context:
space:
mode:
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));
}