[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freeipmi-devel] bmc-info re-architect - please carry over to other
Re: [Freeipmi-devel] bmc-info re-architect - please carry over to other tools
Tue, 23 Jan 2007 14:59:42 -0800
I am pretty much done w/ the re-architecting of bmc-info, ipmi-raw,
ipmi-sensors, and ipmi-sel. I should be done soon w/ bmc-config.
Please ensure the changes get carried into new tools like ipmi-pef and
In additional to the below, please ensure that any memory that is
allocated is also freed. It is no longer acceptable to believe that an
application will "die soon" and allow that memory to leak. There can be
multiple invocations of the same exact code after hostrange support is
On Fri, 2007-01-12 at 22:52 -0800, Albert Chu wrote:
> Howdy everyone,
> I committed code to re-architect bmc-info. Please ensure that this
> re-architecture is carried into atleast the new tools (ipmi-pef,
> ipmi-chassis, etc.) and when you have time, try to carry them over to
> ipmi-sel, ipmi-sensors, etc. I will work on the other tools when I have
> time as well. They are for later hostrange support in the tools. In
> particular, the re-architecture requires:
> A) Removing all globals and putting any program information into a
> structure that can be passed around to all functions doing the "core"
> grunt work of the tool. This sets up thread safety for later.
> B) Move all "core code" out of main(). Create a function that can be
> called by main() to do the entire body of work for the tool. This
> function should be passed the program structure from 'A'. The function
> should return the exit code it would like main to exit with. This
> re-architecture sets up the pthread_create() call for later.
> C) Remove all exit() calls in the "core code" and ensure the only time the
> program exits is in main. Errors should be handled by return -1 or NULL
> etc. and propagated back into the function created by 'B', of which the
> function in 'B' can decide what the exit code for the program should be.
> This prevents early termination based on errors and ensures the correct
> exit code for each thread can be carried until the end.
> Please see the changes to bmc-info and you'll see what I mean.
High Performance Systems Division
Lawrence Livermore National Laboratory