summaryrefslogtreecommitdiff
path: root/util/ipmidir.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-03-30 16:52:34 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-03-30 16:52:34 +0200
commit631fa5250443f5441549bf3184830bc34b0c042e (patch)
tree78fbc8dcfbe36b7f3499c4dc5c3017435d6fb2a1 /util/ipmidir.c
parent09863e30b4f27257be0299024d5a0de255f8ea84 (diff)
parentdf5450149923efb0366001947c1456ed442bc4bb (diff)
Merge branch 'release/3.0.8-1'3.0.8-1
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)