freeipmi-devel
[Top][All Lists]
Advanced

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

[Freeipmi-devel] Re: Modifications necessary for our PPC environment.


From: Albert Chu
Subject: [Freeipmi-devel] Re: Modifications necessary for our PPC environment.
Date: Thu, 08 Jul 2010 10:13:27 -0700

Hey Dick,

> 2)  Executing ipmiping on our target consistently resulted in "Command line 
> option error".
>       This was tracked down to _cmdline_parse() in ping-tool-common.c.  The 
> test:
>       
>               while ((c = getopt (argc, argv, options)) != -1)
> 
>       succeeds even when -1 is returned.  This is a variable/constant size 
> issue as 
>       the test is performed over 16 or 32 bits instead of the 8 bits desired. 
>  I have 
>       fixed the problem with:
>       
>               while ((c = getopt (argc, argv, options)) != (char)-1)

Good catch.  It'll be fixed in the next release, although I'll do it like below 
instead:

--- common/src/pingtool/ping-tool-common.c      8 Feb 2010 22:02:30 -0000       
1.22
+++ common/src/pingtool/ping-tool-common.c      8 Jul 2010 16:44:56 -0000
@@ -213,7 +213,8 @@ _cmdline_parse (int argc,
                 unsigned int max_sequence_number,
                 const char *options)
 {
-  char c, *ptr;
+  char *ptr;
+  int c;
 
   /* Turn off error messages */
   opterr = 0;

> 1)  HAVE_SYS_IO_H and HAVE_ASM_IO_H are both defined in 
> config/config.h.
>       This happens because our build environment has both 
> /usr/include/asm/io.h and
>       /usr/include/sys/io.h present.  However our cross compiler directory 
> chain only
>       has .../asm/io.h present.  I believe the fix for this is for either 
> autoconf
>       or the configure script itself to test for cross compilation and then 
> look in the
>       correct directory tree for the include files.

I think the issue may be you're not setting your CFLAGS or paths
correctly.  I don't know everything about cross-compiling but many
people use things like gcc's --sysroot to set things up properly.

Al

On Thu, 2010-07-08 at 08:10 -0700, address@hidden wrote:
> Hi all,
> 
> I have gotten ipmiping to work on our PPC target platform but had to make two 
> edits to the freeipmi source that you may want to consider fixes for in the 
> future.
> 
> 1)  HAVE_SYS_IO_H and HAVE_ASM_IO_H are both defined in config/config.h.
>       This happens because our build environment has both 
> /usr/include/asm/io.h and
>       /usr/include/sys/io.h present.  However our cross compiler directory 
> chain only
>       has .../asm/io.h present.  I believe the fix for this is for either 
> autoconf
>       or the configure script itself to test for cross compilation and then 
> look in the
>       correct directory tree for the include files.
> 
> 2)  Executing ipmiping on our target consistently resulted in "Command line 
> option error".
>       This was tracked down to _cmdline_parse() in ping-tool-common.c.  The 
> test:
>       
>               while ((c = getopt (argc, argv, options)) != -1)
> 
>       succeeds even when -1 is returned.  This is a variable/constant size 
> issue as 
>       the test is performed over 16 or 32 bits instead of the 8 bits desired. 
>  I have 
>       fixed the problem with:
>       
>               while ((c = getopt (argc, argv, options)) != (char)-1)

This is an easy fix, and I'll make sure it's in the next FreeIPMI release (and 
in other areas getopt() is called).

> Hopefully fixes for these can be included in the next release?
> 
> Thanks for your help in getting freeipmi up and working on our target.
> 
> Dick D.
> 
> 
-- 
Albert Chu
address@hidden
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory




reply via email to

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