summaryrefslogtreecommitdiff
path: root/util/ipmidir.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-01-14 19:52:45 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-01-14 19:52:45 +0100
commitd5cdf594f2678cf690b802fbf4eb687dd9d98c4f (patch)
treee1a4a0b0aee0de7d5f8a03afa444b2470ebdb132 /util/ipmidir.c
parent4b28a392fa890390755f58e0755ab56e8edaa295 (diff)
New upstream version 3.0.8upstream/3.0.8
Diffstat (limited to 'util/ipmidir.c')
-rw-r--r--util/ipmidir.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/util/ipmidir.c b/util/ipmidir.c
index 12b379c..0378d46 100644
--- a/util/ipmidir.c
+++ b/util/ipmidir.c
@@ -403,13 +403,13 @@ int ipmi_open_direct(int fdebugcmd)
#endif
}
- /* Read ipmi_if config file data, if present. */
- status = get_ipmi_if();
- if (status == -1) {
+ /* Read ipmi_if config file data, if present. */
+ status = get_ipmi_if();
+ if (status == -1) {
uchar iftype, iver, sa, inc;
int mybase;
- /* Read SMBIOS to get IPMI struct */
- status = get_IpmiStruct(&iftype,&iver,&sa,&mybase,&inc);
+ /* Read SMBIOS to get IPMI struct */
+ status = get_IpmiStruct(&iftype,&iver,&sa,&mybase,&inc);
if (status == 0) {
if (iftype == 0x04) {
g_DriverType = DRV_SMB;
@@ -427,7 +427,7 @@ int ipmi_open_direct(int fdebugcmd)
} else {
return ERR_NO_DRV; /*no SMBIOS IPMI record*/
}
- }
+ }
#ifndef DOS
/* superuser/root priv is required for direct I/Os */
@@ -438,20 +438,20 @@ int ipmi_open_direct(int fdebugcmd)
}
#endif
/* check lock for driverless interface */
- i = check_lock_dir();
+ i = check_lock_dir();
if (i != 0) {
fprintf(stdout,"open_direct interface locked, %s in use\n",
lock_dir_file);
return ERR_NO_DRV;
}
- /* Find the SMBIOS IPMI driver type, data */
+ /* Find the SMBIOS IPMI driver type, data */
status = ImbInit_dir();
DBGP2("open_direct Init status = %d\n",status);
DBGP2("open_direct base=%x spacing=%d\n",BMC_base,kcs_inc);
if (status == 0) {
fDetectedIF = 1; /*Successfully detected interface */
- /* Send a command to the IPMI interface */
+ /* Send a command to the IPMI interface */
if (!fjustpass)
status = GetDeviceId(&g_bmcType,&g_ipmiVersion);
if (status == 0) {
@@ -459,14 +459,13 @@ int ipmi_open_direct(int fdebugcmd)
if (g_DriverType == DRV_SMB) typ = "smb";
else typ = "kcs";
set_driver_type(typ);
- }
- }
+ }
+ /* set lock for driverless interface */
+ i = set_lock_dir();
+ }
DBGP("open_direct: status=%d, %s drv, ipmi=%d\n",
status,BmcDesc(g_DriverType),g_ipmiVersion);
-
- /* set lock for driverless interface */
- i = set_lock_dir();
- return status;
+ return status;
}
int ipmi_close_direct(void)