[PATCH] size reduction and code clean up for devfsd.c

Tito farmatito at tiscali.it
Tue Jun 26 19:47:49 UTC 2007


Hi,
this is the first size reduction and code clean up patch for devfsd.
This patch:
1) uses some more libbb functions
2) removes useless debug code i left there in the past
3) fixes some style issues i missed in my first pass.

Bloat-o-meter says:

scripts/bloat-o-meter busybox_old busybox_unstripped
function                                             old     new   delta
read_config_file                                    1131    1119     -12
devfsd_main                                          855     842     -13
service_name                                        2465    2451     -14
dir_operation                                        723     683     -40
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-79)             Total: -79 bytes

with all config options turned on.

If there is some volunteer to test this......

Please apply if you like it.

PS: I'll wait one day and if nobody complains about breakage
      I'll start one more round for code cleanup.

BTW: I'm seeing a lot of error messages now when compiling busybox:

miscutils/devfsd.c: In function ‘devfsd_main’:
miscutils/devfsd.c:457: warning: ignoring return value of ‘symlink’, declared with attribute warn_unused_result
miscutils/devfsd.c: In function ‘copy_inode’:
miscutils/devfsd.c:1062: warning: ignoring return value of ‘symlink’, declared with attribute warn_unused_result
miscutils/devfsd.c:1067: warning: ignoring return value of ‘chown’, declared with attribute warn_unused_result

and so on.... 


Ciao,
Tito

-------------- next part --------------
A non-text attachment was scrubbed...
Name: devfsd02.patch
Type: text/x-diff
Size: 15519 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070626/1aac6c92/attachment-0002.bin 


More information about the busybox mailing list