[Toybox] [PATCH] [CLEANUP] init: inline 2 functions, style, remove ifdef
ibid.ag at gmail.com
ibid.ag at gmail.com
Wed Jan 1 16:07:04 PST 2014
cleanup init: inline 2 functions, style, remove ifdef
- Two functions (assign_signal_handler() and set_enviornment()) were
called once from init_main(); inline them.
(inittab_parsing() is also called once, but it's large and messy
enough that splitting it out seems to clarify things.)
- As mentioned before, the #ifdef VT_OPENQRY block did not seem to have any
logical behavior. I deleted that and TERM to "linux" not "vt102".
I note though that "linux" should probably be a platform-specific
variable, so Net/OpenBSD should get "wscons" and FreeBSD "syscons"
if we ever support building init there.
- casting "VAR=value" to char* isn't necessary, as far as I can tell.
- Change #include<> to #include <>.
Potential issues not addressed:
-panic if fork/vfork fails (not observed; expected from final_run()).
-possible panic on some embedded platforms (CONFIG_VT disabled?):
xprintf() means that failing to write messages will panic the kernel.
Thanks,
Isaac Dunham
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init-cleanup.diff
Type: text/x-diff
Size: 3187 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20140101/27701943/attachment-0006.diff>
More information about the Toybox
mailing list