[PATCH]: beautify code in halt.c
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Wed Sep 10 09:18:12 UTC 2008
On Tue, Sep 09, 2008 at 05:54:59PM +0200, walter harms wrote:
> hi list,
> i tried to understand the halt code and found it hard because #ifdef obvouscated
> a lot of the code. I moved the wtmp stuff into its own function what made it easy
> for #ifdef.
So, did that increase the size of the applet? output of size(1), please.
>
> can someone take a look at the #ifdef magic for RB_HALT_SYSTEM ?
> 1. it seems RB_HALT is only used by netbsd.
> 2. init.c should have the same problem but simply defines RB_HALT_SYSTEM
> when not found.
>
> IMHO 2. is not clever.
>
> 1. both sould use the same code (= move to platform.h) or drop it
> 2. init should fail. if the value for RB_HALT_SYSTEM is wrong for a system
> user will become crasy why searching the bug (and halt is not used often)
an
#else
#error no idea how to RB_HALT_SYSTEM
should do the trick.
More information about the busybox
mailing list