freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freeipmi-devel] 0.3.1 ready?


From: Dmitry Frolov
Subject: Re: [Freeipmi-devel] 0.3.1 ready?
Date: Thu, 14 Dec 2006 00:22:07 +0600
User-agent: Mutt/1.5.11

* Anand Babu <address@hidden> [13.12.2006 23:49]:

> On Wed, Dec 13, 2006 at 08:58:08AM -0800, Al Chu wrote:
> ,----
> | Does everyone think it's ready?
> `----
> FreeBSD testing is OK?

Below is another small and last FBSD-compat patch for 0.3.1. It makes
openipmi interface work with FBSD's ipmi(4) driver.

Related question: is there a good reason to not include system-supplied
ipmi.h and hardcode defines and typedefs right in the library source?
The better way to not depend on kernel headers I thinking of is:

Put openipmi's ipmi.h under compat/ dir. Do:

#ifdef HAVE_LINUX_IPMI_H
#include it
#elif defined(HAVE_SYS_IPMI_H)
#include <sys/ipmi.h>   /* FBSD way */
#else
#include <compat/ipmi.h>
#endif

Index: libfreeipmi/src/ipmi-openipmi-api.c
===================================================================
RCS file: /sources/freeipmi/freeipmi/libfreeipmi/src/ipmi-openipmi-api.c,v
retrieving revision 1.5
diff -u -d -p -r1.5 ipmi-openipmi-api.c
--- libfreeipmi/src/ipmi-openipmi-api.c 5 Sep 2006 05:56:49 -0000       1.5
+++ libfreeipmi/src/ipmi-openipmi-api.c 13 Dec 2006 18:04:32 -0000
@@ -100,8 +100,13 @@ struct openipmi_recv
 #define OPENIPMI_IOC_MAGIC             'i'
 #define OPENIPMICTL_RECEIVE_MSG_TRUNC  _IOWR(OPENIPMI_IOC_MAGIC, 11, struct 
openipmi_recv)
 #define OPENIPMICTL_RECEIVE_MSG        _IOWR(OPENIPMI_IOC_MAGIC, 12, struct 
openipmi_recv)
+#if defined(__FreeBSD__)
+#define OPENIPMICTL_SEND_COMMAND       _IOW(OPENIPMI_IOC_MAGIC,  13, struct 
openipmi_req)
+#define OPENIPMICTL_SET_MY_ADDRESS_CMD _IOW(OPENIPMI_IOC_MAGIC,  17, unsigned 
int)
+#else
 #define OPENIPMICTL_SEND_COMMAND       _IOR(OPENIPMI_IOC_MAGIC,  13, struct 
openipmi_req)
 #define OPENIPMICTL_SET_MY_ADDRESS_CMD _IOR(OPENIPMI_IOC_MAGIC,  17, unsigned 
int)
+#endif
 #define OPENIPMICTL_GET_MY_ADDRESS_CMD _IOR(OPENIPMI_IOC_MAGIC,  18, unsigned 
int)
 
 static char * ipmi_openipmi_ctx_errmsg[] =

    wbr&w, dmitry.
-- 
Dmitry Frolov <address@hidden>
RISS-Telecom Network, Novosibirsk, Russia
address@hidden, +7 383 2278800, DVF-RIPE




reply via email to

[Prev in Thread] Current Thread [Next in Thread]