diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-11-06 01:42:44 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-11-06 01:42:44 +0100 |
commit | 7551a684bcbc7de7ac3d2e52eea0f9f812affd18 (patch) | |
tree | 469d3c40a1c88fcb3ec208a820f7a0fa93dca81c /util/ipmimv.c | |
parent | c71717661b7ee871e5bc957f314ad8779e85abc6 (diff) | |
parent | ee6c7128ed0d58cb1812049463a13bba9cfb31b7 (diff) |
Merge tag 'upstream/2.9.7'
Upstream version 2.9.7
Diffstat (limited to 'util/ipmimv.c')
-rw-r--r-- | util/ipmimv.c | 29 |
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*/ |