diff options
Diffstat (limited to 'util/ipmidir.c')
-rw-r--r-- | util/ipmidir.c | 15 |
1 files changed, 10 insertions, 5 deletions
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 <sys/io.h> */ #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 <stdio.h> #include <stdlib.h> #include <fcntl.h> @@ -85,7 +88,7 @@ int ipmi_set_max_kcs_loops(int ms) #if defined(LINUX) #include <sys/io.h> -#elif defined(BSD) || defined(MACOS) +#elif defined(BSD) || defined(MACOS) || defined(HPUX) // #include <machine/cpufunc.h> 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"); |