Re: freeipmi 0.8.0b2 on netbsd

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: freeipmi 0.8.0b2 on netbsd

by Al Chu11 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey John,

Thanks for the input.  Everything should be fixed in beta3.  I'll try to
release it today or tomorrow.

Al

On Wed, 2009-10-21 at 12:47 -0700, john heasley wrote:

> gcc -g -O0 -DHAVE_CONFIG_H -I. -I. -I../../../config -I../../../common/src/debugutil -I../../../common/src/miscutil -I../../../common/src/portability -I../../../libfreeipmi/include -I../../../libfreeipmi/src -D_GNU_SOURCE -D_REENTRANT -I/usr/pkg/include -MT libapi_la-ipmi-api-util.lo -MD -MP -MF .deps/libapi_la-ipmi-api-util.Tpo -c ipmi-api-util.c  -fPIC -DPIC -o .libs/libapi_la-ipmi-api-util.o
> In file included from ipmi-api-util.c:39:
> ipmi-api-defs.h:119: error: field 'last_send' has incomplete type
> ipmi-api-defs.h:120: error: field 'last_received' has incomplete type
> *** [libapi_la-ipmi-api-util.lo] Error code 1
>
> ipmi-api-defs.h needs sys/time.h
>
>
>  gcc -g -O0 -DHAVE_CONFIG_H -I. -I. -I../../../config -I../../../libfreeipmi/include -I../../../libfreeipmi/src -I../../../common/src/portability -DIPMI_IPCKEY=\"/usr/local/var/lib/freeipmi/ipckey\" -DIPMI_DEBUG_IPCKEY=\"../../../libfreeipmi/src/ipmi-semaphores.h\" -D_GNU_SOURCE -D_REENTRANT -I/usr/pkg/include -MT libdriver_la-ipmi-kcs-driver.lo -MD -MP -MF .deps/libdriver_la-ipmi-kcs-driver.Tpo -c ipmi-kcs-driver.c  -fPIC -DPIC -o .libs/libdriver_la-ipmi-kcs-driver.o
> ipmi-kcs-driver.c: In function '_set_kcs_ctx_errnum_by_errno':
> ipmi-kcs-driver.c:208: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:210: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:212: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:214: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:216: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:218: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:220: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:222: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:224: error: called object '__errno' is not a function
> *** Error code 1
>
> its customary for the __ prefix to be reserved for o/s includes and
> libs.  the _ prefix or __ postfix would correct this problem, which
> occurs in several places in the code.
>
> and, libfreeipmi/src/driver/ipmi-ssif-driver.c and
> libfreeipmi/src/interface/ipmi-lan-interface.c need limits.h.
>
> KCS_ERR_SYSTEM_ERROR() is not defined; I think this is the intended
> code:
>
> --- freeipmi-0.8.0.beta2.orig/libfreeipmi/src/driver/ipmi-kcs-driver.c  2009-10-
> 02 17:26:25.000000000 +0000
> +++ freeipmi-0.8.0.beta2/libfreeipmi/src/driver/ipmi-kcs-driver.c       2009-10-
> 19 22:40:54.000000000 +0000
> @@ -200,7 +200,7 @@
>  };
>  
>  static void
> -_set_kcs_ctx_errnum_by_errno (ipmi_kcs_ctx_t ctx, int __errno)
> +_set_kcs_ctx_errnum_by_errno (ipmi_kcs_ctx_t ctx, int _errno)
>  {
>    if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC)
>      return;
> @@ -507,7 +507,8 @@
>      }
>  #else /* !HAVE_IOPL */
>    /* otherwise, we always return a system error */
> -  KCS_ERR_SYSTEM_ERROR (0);
> +  ctx->errnum = IPMI_KCS_ERR_SYSTEM_ERROR;
> +  return (-1);
>  #endif /* !HAVE_IOPL */
>  #endif /* !__FreeBSD__ */
>
>
> and, there is a mutex locking error in ipmi-kcs-driver.c, unlocking an
> unlocked mutex.  a possible fix is:
>
> diff -du freeipmi-0.8.0.beta2.orig/ipmiconsole/src/libipmiconsole/ipmiconsole_en
> gine.c freeipmi-0.8.0.beta2/ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c
> --- freeipmi-0.8.0.beta2.orig/ipmiconsole/src/libipmiconsole/ipmiconsole_engine.
> c       2009-10-02 17:26:23.000000000 +0000
> +++ freeipmi-0.8.0.beta2/ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c    
> 2009-10-19 22:53:26.000000000 +0000
> @@ -1153,7 +1153,7 @@
>      {
>        IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr)));
>        errno = perr;
> -      goto cleanup;
> +      return(-1);
>      }
>  
>    if ((perr = pthread_attr_init (&attr)))
> @@ -1193,12 +1193,14 @@
>    rv = 0;
>   cleanup:
>  
> +#if 0
>    if ((perr = pthread_mutex_unlock (&console_engine_thread_count_mutex)))
>      {
>        IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr)));
>        errno = perr;
>        return (-1);
>      }
> +#endif
>  
>    return (rv);
>  }
>
> there are a few more mutex errors in the code, such as destroying locked
> mutexes, I haven't tried to fix those.
>
> thanks for the free tool.
>
> Cheers
--
Albert Chu
chu11@...
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

Re: freeipmi 0.8.0b2 on netbsd

by john heasley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thu, Oct 22, 2009 at 01:20:55PM -0700, Al Chu:
> Hey John,
>
> Thanks for the input.  Everything should be fixed in beta3.  I'll try to
> release it today or tomorrow.

Hi.  A feature suggestion; I personally hate PCs or more precisely BIOS,
biggest PoS I've ever encountered.  From the Unix and X11 side, it'd be
really sweet to be able send the myriad of PC function keys from a non-PC
keyboard via SOL to be able to control BIOS set-up and the BIOS
set-up/maintenance features of various raid cards etc.

The PC Weasel board was cool in this regard; hit the escape sequence (ctrl
shift 6), then k or something like that, then F 1 or F 1 2, or E S C, or
C T R L - S H I F T - 1, etc and it translated that to whatever the sequence
is for those keys.  Sadly, the Weasel isnt made anymore, but it didnt have
all the capabilities of IPMI anyway.


_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

Re: freeipmi 0.8.0b2 on netbsd

by Al Chu11 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi John,

I suppose this wouldn't be impossible to add, I'd have to figure out
what characters each F1-F12 equate to (maybe you know, but I don't, just
need to research).  It wouldn't be too far removed from the &D escape I
already have (some keyboard's apparently send something else other than
the delete character when you hit 'del').

Al

On Thu, 2009-10-22 at 14:18 -0700, john heasley wrote:

> Thu, Oct 22, 2009 at 01:20:55PM -0700, Al Chu:
> > Hey John,
> >
> > Thanks for the input.  Everything should be fixed in beta3.  I'll try to
> > release it today or tomorrow.
>
> Hi.  A feature suggestion; I personally hate PCs or more precisely BIOS,
> biggest PoS I've ever encountered.  From the Unix and X11 side, it'd be
> really sweet to be able send the myriad of PC function keys from a non-PC
> keyboard via SOL to be able to control BIOS set-up and the BIOS
> set-up/maintenance features of various raid cards etc.
>
> The PC Weasel board was cool in this regard; hit the escape sequence (ctrl
> shift 6), then k or something like that, then F 1 or F 1 2, or E S C, or
> C T R L - S H I F T - 1, etc and it translated that to whatever the sequence
> is for those keys.  Sadly, the Weasel isnt made anymore, but it didnt have
> all the capabilities of IPMI anyway.
--
Albert Chu
chu11@...
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

Re: freeipmi 0.8.0b2 on netbsd

by john heasley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fri, Oct 23, 2009 at 10:49:02AM -0700, Al Chu:
> Hi John,
>
> I suppose this wouldn't be impossible to add, I'd have to figure out
> what characters each F1-F12 equate to (maybe you know, but I don't, just
> need to research).  It wouldn't be too far removed from the &D escape I
> already have (some keyboard's apparently send something else other than
> the delete character when you hit 'del').

maybe the pty/tty/X; eg: on freebsd/netbsd, keys can be mapped to other
keycodes within the keyboard drivers (wskbd).

I'm not sure what the codes/escape strings are; I had them stored
somewhere, but cant find them now.  This looks promising:

http://aperiodic.net/phil/archives/Geekery/term-function-keys.html

> Al
>
> On Thu, 2009-10-22 at 14:18 -0700, john heasley wrote:
> > Thu, Oct 22, 2009 at 01:20:55PM -0700, Al Chu:
> > > Hey John,
> > >
> > > Thanks for the input.  Everything should be fixed in beta3.  I'll try to
> > > release it today or tomorrow.
> >
> > Hi.  A feature suggestion; I personally hate PCs or more precisely BIOS,
> > biggest PoS I've ever encountered.  From the Unix and X11 side, it'd be
> > really sweet to be able send the myriad of PC function keys from a non-PC
> > keyboard via SOL to be able to control BIOS set-up and the BIOS
> > set-up/maintenance features of various raid cards etc.
> >
> > The PC Weasel board was cool in this regard; hit the escape sequence (ctrl
> > shift 6), then k or something like that, then F 1 or F 1 2, or E S C, or
> > C T R L - S H I F T - 1, etc and it translated that to whatever the sequence
> > is for those keys.  Sadly, the Weasel isnt made anymore, but it didnt have
> > all the capabilities of IPMI anyway.
> --
> Albert Chu
> chu11@...
> Computer Scientist
> High Performance Systems Division
> Lawrence Livermore National Laboratory


_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel