[PATCH 1/2] start-stop-daemon --test

Roy Marples roy at marples.name
Wed Apr 30 15:10:55 UTC 2008


On Wednesday 30 April 2008 14:57:53 Denys Vlasenko wrote:
> On Wednesday 30 April 2008 13:15, Roy Marples wrote:
> > start-stop-daemon should implement --test option.
> > This is used to check if the daemon is running or not.
>
> +       test = (opt & OPT_TEST);
>
> It already is in a variable. Lets use this:
>
> #define test (option_mask32 & OPT_TEST)
>
> I just did it for quiet. Saved 17 bytes.
>
> Can you do that for test too?

Anything to save a few bytes and get this into busybox :)

Before
function                                             old     new   delta
start_stop_daemon_main                               995    1012     +17
start_stop_daemon_longopts                           149     156      +7
.rodata                                           119308  119312      +4
packed_usage                                       23686   23682      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 28/-4)              Total: 24 bytes

After
function                                             old     new   delta
start_stop_daemon_longopts                           149     156      +7
start_stop_daemon_main                               978     984      +6
.rodata                                           119308  119312      +4
packed_usage                                       23686   23682      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 17/-4)              Total: 13 bytes

Thanks

Roy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bb-ssd-test.patch
Type: text/x-diff
Size: 3037 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20080430/020104d6/attachment.bin 


More information about the busybox mailing list