From ee6c7128ed0d58cb1812049463a13bba9cfb31b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 6 Nov 2015 01:42:41 +0100 Subject: Imported Upstream version 2.9.7 --- util/ipmidir.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'util/ipmidir.c') diff --git a/util/ipmidir.c b/util/ipmidir.c index 4865bc0..501f47b 100644 --- a/util/ipmidir.c +++ b/util/ipmidir.c @@ -46,6 +46,9 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *----------------------------------------------------------------------*/ +#if defined(__IA64__) +#define STUB_IO 1 +#endif #if defined(STUB_IO) /* May stub out direct io. For instance, PPC does not support */ #define UCHAR unsigned char @@ -64,7 +67,7 @@ int ipmi_cmd_direct(UINT16 icmd, UCHAR *pdata, int sdata, UCHAR *presp, int ipmi_set_max_kcs_loops(int ms) { return(0); } -#elif defined(LINUX) || defined(BSD) || defined(DOS) || defined(MACOS) +#elif defined(LINUX) || defined(BSD) || defined(DOS) || defined(MACOS) || defined(HPUX) #include #include #include @@ -85,7 +88,7 @@ int ipmi_set_max_kcs_loops(int ms) #if defined(LINUX) #include -#elif defined(BSD) || defined(MACOS) +#elif defined(BSD) || defined(MACOS) || defined(HPUX) // #include int iofd = -1; @@ -201,7 +204,7 @@ extern unsigned outp(unsigned _port, unsigned _value); #define WritePortUchar( addr, val ) outp((addr),(val)) #define WritePortUlong( addr, val ) ( outp((addr),(val)) ) #define ReadPortUlong( addr, valp ) (*(valp) = inp((addr)) ) -#elif defined(BSD) || defined(MACOS) +#elif defined(BSD) || defined(MACOS) || defined(HPUX) #define _INB(addr) inbc((addr)) #define _OUTB(data, addr) outbc((addr),(data)) #define _IOPL(data) 0 @@ -421,6 +424,8 @@ int ipmi_open_direct(int fdebugcmd) BMC_base = mybase; DBGP("smbios: Driver=%d(%s), sa=%02x, Base=0x%04x, Spacing=%d\n", g_DriverType,BmcDesc(g_DriverType),sa,mybase,inc); + } else { + return ERR_NO_DRV; /*no SMBIOS IPMI record*/ } } @@ -467,7 +472,7 @@ int ipmi_open_direct(int fdebugcmd) int ipmi_close_direct(void) { int status = 0; -#if defined(BSD) || defined(MACOS) +#if defined(BSD) || defined(MACOS) || defined(HPUX) close(iofd); iofd = -1; #endif @@ -1227,7 +1232,7 @@ int ImbInit_dir(void) BMC_base = kcsBaseAddress; DBGP("Continuing with KCS on Default Port 0x%04x\n",kcsBaseAddress); } -#if defined(BSD) || defined(MACOS) +#if defined(BSD) || defined(MACOS) || defined(HPUX) iofd = open("/dev/io",O_RDWR); if (iofd < 0) { printf("Cannot open /dev/io...Exiting\n"); -- cgit v1.2.3