Commit Graph

49 Commits

Author SHA1 Message Date
Denis Vlasenko
9725daa03a halt: reinstate -w even if !FEATURE_WTMP; beautify code in halt.c 2008-09-11 09:54:23 +00:00
Bernhard Reutner-Fischer
d93179fd5b - halt's -w depends on FEATURE_WTMP (Vladimir Dronnikov) 2008-09-01 15:24:52 +00:00
Denis Vlasenko
1e28f6171f halt: signal init regardless of ENABLE_INIT 2008-08-03 18:43:45 +00:00
Bernhard Reutner-Fischer
ef9876a40e - document -f 2008-07-21 11:30:51 +00:00
Denis Vlasenko
a60f84ebf0 *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
Bernhard Reutner-Fischer
62d8503589 - use ut_user rather than ut_name (Cristian Ionescu-Idbohrn)
- use ut_tv.tv_sec rather than ut_time (me)
- shrink halt a little bit (me):
halt_main                                            464     433     -31
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-31)             Total: -31 bytes
2008-06-01 10:10:22 +00:00
Denis Vlasenko
1d42665b6b *: shrink: use Vladimir's "o+" specifier instead of xatou(opt_param)
function                                             old     new   delta
getopt32                                            1370    1385     +15
sulogin_main                                         490     494      +4
realpath_main                                         84      86      +2
sleep_main                                            76      77      +1
mt_main                                              256     257      +1
printenv_main                                         75      74      -1
fdformat_main                                        546     545      -1
usleep_main                                           44      42      -2
setlogcons_main                                       77      75      -2
ed_main                                             2654    2649      -5
deallocvt_main                                        69      64      -5
addgroup_main                                        373     368      -5
mkfs_minix_main                                     2989    2982      -7
tail_main                                           1221    1213      -8
sv_main                                             1254    1241     -13
du_main                                              348     328     -20
tftp_main                                            325     302     -23
split_main                                           581     558     -23
nc_main                                             1000     977     -23
diff_main                                            891     868     -23
arping_main                                         1797    1770     -27
ls_main                                              893     847     -46
od_main                                             2797    2750     -47
readprofile_main                                    1944    1895     -49
tcpudpsvd_main                                      1973    1922     -51
udhcpc_main                                         2590    2513     -77
grep_main                                            824     722    -102
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/22 up/down: 23/-560)         Total: -537 bytes
   text    data     bss     dec     hex filename
 796973     658    7428  805059   c48c3 busybox_old
 796479     662    7420  804561   c46d1 busybox_unstripped
2008-03-17 09:09:09 +00:00
Denis Vlasenko
85c247161b *: fix fallout from -Wunused-parameter
function                                             old     new   delta
bbunpack                                             358     366      +8
passwd_main                                         1070    1072      +2
handle_incoming_and_exit                            2651    2653      +2
getpty                                                88      86      -2
script_main                                          975     972      -3
inetd_main                                          2036    2033      -3
dname_enc                                            377     373      -4
make_new_session                                     474     462     -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/5 up/down: 12/-24)            Total: -12 bytes
   text    data     bss     dec     hex filename
 797429     658    7428  805515   c4a8b busybox_old
 797417     658    7428  805503   c4a7f busybox_unstripped
2008-03-17 09:04:04 +00:00
Denis Vlasenko
680b86afbb halt: write wtmp entry if wtmp support is enabled 2008-01-24 02:28:00 +00:00
Denis Vlasenko
9b49a5ed85 add -fvisibility=hidden to CC flags, mark XXX_main functions
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
fe7cd642b0 don't pass argc in getopt32, it's superfluous
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes
   text    data     bss     dec     hex filename
 773469    1058   11092  785619   bfcd3 busybox_old
 772644    1058   11092  784794   bf99a busybox_unstripped
2007-08-18 15:32:12 +00:00
Denis Vlasenko
b6adbf1be2 usage.c: remove reference to busybox.h
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Bernhard Reutner-Fischer
febe3c4211 - sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g" 2007-04-04 20:52:03 +00:00
Denis Vlasenko
06af216528 suppress warnings about easch <applet>_main() having
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
35fb512728 PID should be stored in pid_t, not int or long.
find_pid_by_name() was returning 0 or -1 in last array element,
but -1 was never checked. We can use just 0 intead.
2006-11-01 09:16:49 +00:00
Denis Vlasenko
e1a0d486e4 message string changes, mostly for consistency, also -32 bytes in .rodata 2006-10-20 13:28:22 +00:00
Denis Vlasenko
1385899416 attempt to regularize atoi mess. 2006-10-08 12:49:22 +00:00
Denis Vlasenko
8f8f268cfd bb_applet_name -> applet_name 2006-10-03 21:00:43 +00:00
Denis Vlasenko
67b23e6043 getopt_ulflags -> getopt32.
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
2006-10-03 21:00:06 +00:00
Rob Landley
e9a7a6212b Change license statements (and clean up headers) on some of the files that
Erik or I are primary copyright holders on.
2006-09-22 02:52:41 +00:00
Bernhard Reutner-Fischer
e15d7573a1 - move #include busybox.h to the very top so we pull in the config
and eventual platform specific includes in early.
2006-06-02 20:56:16 +00:00
Bernhard Reutner-Fischer
d765ee5d0f - provide fallback defines for non-linux 2006-05-26 20:34:02 +00:00
Rob Landley
0a7c8ef6e2 Patch from Denis Vlasenko to constify things and fix a few typos. 2006-02-22 17:01:00 +00:00
Rob Landley
646129163a Re-add initrd support, unify halt/reboot/poweroff, add -n and -f options. 2006-01-30 08:31:37 +00:00
Rob Landley
2edf52643d The whole "init is sometimes pid 3" thing is silly. Init is pid 1, anything
else is a kernel bug.  Both 2.4 and 2.6 should get this right now.  This
should fix the bug IraquiGeek is seeing (although killall still needs to
be fixed.)
2006-01-22 02:41:51 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Eric Andersen
0246222351 Support reboot, halt, and poweroff independent of busybox init.
Simplify and fixup some logic.
 -Erik
2003-07-22 09:41:39 +00:00
Eric Andersen
cb81e6484d Update a bunch of docs. Run a script to update my email addr. 2003-07-14 21:21:08 +00:00
Eric Andersen
b01ed65ad2 Apply last_patch93 from vodz:
andersen@busybox.net wrote:
    >Message: 4
    >Modified Files:
    >       init.c
    >Log Message:
    >Remove code for unsupported kernel versions

    Hmm. Current init.c have check >= 2.2.0 kernel one time too.
    Ok. Last patch removed this point and move common init code to new file for
    /init dir
2003-06-27 17:08:15 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Eric Andersen
1d1d2f9b18 Update some missing copyright notices 2002-04-13 08:31:59 +00:00
Eric Andersen
b24d65659f If find_pid_by_name() had an error, it was returning -1, but storing
that into a pid_t, which is unsigned on a number archs.  Furthermore,
find_pid_by_name() would _never_ return an error if the intended proces
was "init", but instead would return 1, meaning we would fail to work
on 2.4.x kernels running an initrd...
 -Erik
2001-12-06 14:52:32 +00:00
Eric Andersen
bdfd0d78bc Major rework of the directory structure and the entire build system.
-Erik
2001-10-24 05:00:29 +00:00
Eric Andersen
11fdb8a4c7 Fix a nasty bug with variable name shadowing 2001-10-18 04:04:34 +00:00
Eric Andersen
371ca19f53 Look for either "init" or "linuxrc" processes 2001-10-03 21:26:12 +00:00
Eric Andersen
332394b577 Be extra extra careful about what we dereference. 2001-07-05 16:09:32 +00:00
Mark Whitley
f57c944e09 Changed names of functions in utility.c and all affected files, to make
compliant with the style guide. Everybody rebuild your tags file!
2000-12-07 19:56:48 +00:00
Eric Andersen
3570a34de4 Renamed "internal.h" to the more sensible "busybox.h".
-Erik
2000-09-25 21:45:58 +00:00
Matt Kraai
27a804246a Centralize handling of --help. 2000-07-19 19:24:01 +00:00
Matt Kraai
2f46b664b7 Add usage messages for applets without them. 2000-07-19 18:01:00 +00:00
Eric Andersen
b610615be9 Updates to a number of apps to remove warnings/compile errors under libc5.
Tested under both libc5 and libc6 and all seems well with these fixes.
 -Erik
2000-06-19 17:25:40 +00:00
Erik Andersen
825aead68b Patch to make killall actually kill all PIDs with the specified name,
rather then busylooping trying to kill the first one until it dies.
Should be more efficient now, and will only send one signal to each
specified process.
 -Erik
2000-04-07 06:00:07 +00:00
Erik Andersen
2ac2fae728 Fix bugs related to finding PIDs.
-Erik
2000-03-07 23:32:17 +00:00
Erik Andersen
246cc6dddd Wrote killall.
Adjusted mount, ps, utility.c, etc to handle my nifty new kernel
patches the allow busybox to run perfectly without /proc.
 -Erik
2000-03-07 07:41:42 +00:00
Erik Andersen
e49d5ecbbe Some formatting updates (ran the code through indent)
-Erik
2000-02-08 19:58:47 +00:00
Eric Andersen
6805d5d69e Adjustments for Johns init stuff,
-Erik
1999-12-09 22:39:55 +00:00
Eric Andersen
c49960189a Fixed up copyright notices and such 1999-10-20 22:08:37 +00:00
Eric Andersen
703c62da63 More stuff 1999-10-18 21:31:00 +00:00
Eric Andersen
cc8ed39b24 Initial revision 1999-10-05 16:24:54 +00:00