summaryrefslogtreecommitdiff
path: root/util/ipmimv.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/ipmimv.c')
-rw-r--r--util/ipmimv.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/util/ipmimv.c b/util/ipmimv.c
index 06b1baf..4404beb 100644
--- a/util/ipmimv.c
+++ b/util/ipmimv.c
@@ -52,7 +52,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*----------------------------------------------------------------------*/
-#if defined(LINUX) || defined(BSD) || defined(MACOS)
+#if defined(LINUX) || defined(BSD) || defined(MACOS) || defined(HPUX)
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
@@ -62,6 +62,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <time.h>
#include <errno.h>
#include <sys/ioctl.h>
+#include <sys/select.h>
#if defined(MACOS)
#include <sys/time.h>
#else
@@ -111,7 +112,7 @@ struct timeval {
#endif
int ipmi_timeout_mv = 10; /* 10 seconds, was 5 sec */
-#if defined(BSD) || defined(MACOS)
+#if defined(BSD) || defined(MACOS) || defined(HPUX)
#pragma pack(1)
#endif
@@ -152,7 +153,7 @@ struct ipmi_cmdspec
unsigned char netfn;
unsigned char cmd;
};
-#if defined(BSD) || defined(MACOS)
+#if defined(BSD) || defined(MACOS) || defined(HPUX)
#pragma pack()
/* FreeBSD 7.x ipmi ioctls, use _IOW */
#define IPMI_IOC_MAGIC 'i'
@@ -253,23 +254,23 @@ int ipmi_open_mv(char fdebugcmd)
pdev = "/dev/ipmi/0";
ipmi_fd = open("/dev/ipmi/0", O_RDWR);
if (ipmi_fd == -1) {
- if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
- pdev = "/dev/ipmi0";
- ipmi_fd = open(pdev, O_RDWR);
+ if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
+ pdev = "/dev/ipmi0";
+ ipmi_fd = open(pdev, O_RDWR);
}
if (ipmi_fd == -1) {
- if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
- pdev = "/dev/ipmidev0";
- ipmi_fd = open(pdev, O_RDWR);
+ if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
+ pdev = "/dev/ipmidev0";
+ ipmi_fd = open(pdev, O_RDWR);
}
if (ipmi_fd == -1) {
- if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
- pdev = "/dev/ipmidev/0";
- ipmi_fd = open(pdev, O_RDWR);
+ if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
+ pdev = "/dev/ipmidev/0";
+ ipmi_fd = open(pdev, O_RDWR);
}
if (ipmi_fd == -1) {
- if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
- return(-1);
+ if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
+ return(-1);
}
ipmi_get_mymc(&bus,&sa,&lun,NULL);
if (sa != BMC_SA) { /* user specified my slave address*/