[PATCH] sulogin size reduction and clean up

Tito farmatito at tiscali.it
Sat Jul 15 20:25:23 UTC 2006


Hi,
this patch reduces the size of sulogin and cleans up the code.
The patch also adds a config option to enable/disable syslogging in sulogin.

with syslogging enabled
function                                             old     new   delta
safe_strtol                                           -      78     +78
bb_xopen3                                         -      39     +39
msg_and_log                                      -      35     +35
safe_strtoi                                           -      34     +34
bb_xopen                                            -      22     +22
.rodata                                           912    1832     -80
sulogin_main                                 659     415    -244
bb_common_bufsiz1                    8193       -   -8193
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 0/2 up/down: 208/-8517)       Total: -8309 bytes


with syslogging disabled
function                                             old     new   delta
safe_strtol                                            -      78     +78
bb_xopen3                                              -      39     +39
safe_strtoi                                            -      34     +34
msg_and_log                                            -      24     +24
bb_xopen                                               -      22     +22
.rodata                                             1912    1832     -80
sulogin_main                                         659     400    -259
bb_common_bufsiz1                                   8193       -   -8193
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 0/2 up/down: 197/-8532)       Total: -8335 bytes


The patch is tested and works for me.
Please apply if you like it.

Ciao,
Tito
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sulogin.patch
Type: text/x-diff
Size: 4957 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060715/c7f841b1/attachment.bin 


More information about the busybox mailing list