[PATCH]: beautify code in halt.c
walter harms
wharms at bfs.de
Tue Sep 9 15:54:59 UTC 2008
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.
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)
re,
wh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: halt.diff
Type: text/x-patch
Size: 2496 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20080909/4b877f92/attachment-0002.bin
More information about the busybox
mailing list