aboutsummaryrefslogtreecommitdiff
path: root/init/halt.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update applet size estimatesDenys Vlasenko2023-07-101-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* help text tweaksDenys Vlasenko2020-12-181-3/+3
| | | | | | | function old new delta packed_usage 33570 33502 -68 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use sleep1()Denys Vlasenko2020-11-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | function old new delta sleep1 - 9 +9 run_shutdown_and_kill_processes 97 95 -2 restore_state_and_exit 116 114 -2 reread_partition_table 67 65 -2 flush_buffer_cache 80 78 -2 chat_main 1302 1300 -2 timeout_main 310 307 -3 telnet_main 1235 1232 -3 stop_handler 86 83 -3 process_action 1078 1075 -3 nbdclient_main 1185 1182 -3 init_main 789 786 -3 getty_main 1541 1538 -3 do_time 410 407 -3 runsv_main 1682 1677 -5 pause_and_low_level_reboot 59 54 -5 inetd_main 1917 1911 -6 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/16 up/down: 9/-50) Total: -41 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: update size informationDenys Vlasenko2018-12-281-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* poweroff: add a config option for people needing VERY early poweroffDenys Vlasenko2018-02-191-0/+54
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* regularize format of source file headers, no code changesDenys Vlasenko2017-09-181-1/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: deindent all help textsDenys Vlasenko2017-07-211-10/+10
| | | | | | Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Update menuconfig items with approximate applet sizesDenys Vlasenko2017-07-181-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: add comment about APPLET_ODDNAME formatDenys Vlasenko2017-01-291-1/+2
| | | | | | It confused me more than once Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Make halt/poweroff/reboot independently selectableDenys Vlasenko2016-11-141-9/+32
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LISTDenys Vlasenko2016-07-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many cases, this aqllows to drop use of opt_complementary. Approximately -400 bytes: function old new delta getopt32 1423 1502 +79 opt_string 17 18 +1 OPT_STR 24 25 +1 uniq_main 416 406 -10 timeout_main 279 269 -10 sulogin_main 270 260 -10 readprofile_main 1825 1815 -10 ps_main 543 533 -10 pidof_main 245 235 -10 pgrep_main 611 601 -10 od_main 2600 2590 -10 mkfs_minix_main 2684 2674 -10 mkfs_ext2_main 2603 2593 -10 microcom_main 712 702 -10 makemime_main 315 305 -10 ionice_main 282 272 -10 inetd_main 2074 2064 -10 ifplugd_main 1144 1134 -10 halt_main 353 343 -10 getopt_main 636 626 -10 fdisk_main 2854 2844 -10 env_main 206 196 -10 dmesg_main 319 309 -10 conspy_main 1214 1204 -10 awk_main 981 971 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/22 up/down: 81/-220) Total: -139 bytes text data bss dec hex filename 919373 906 14060 934339 e41c3 busybox_old 918969 906 14060 933935 e402f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Rename FEATURE_INITRD to LINUXRC and make it separate, not an alias to initDenys Vlasenko2016-03-311-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: Switch to POSIX utmpx APIBernhard Reutner-Fischer2015-04-021-2/+2
| | | | | | | | | | UTMP is SVID legacy, UTMPX is mandated by POSIX. Glibc and uClibc have identical layout of UTMP and UTMPX, both of these libc treat _PATH_UTMPX as _PATH_UTMP so from a user-perspective nothing changes except the names of the API entrypoints. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* halt: perror_msg_and_die needs bb_ prefixDenys Vlasenko2011-07-081-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* halt/reboot: better message if /sbin/telinit is not foundDenys Vlasenko2011-07-031-1/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-3/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move utmp.h include to libbb.hDenys Vlasenko2011-01-251-1/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mass removal of underscores from _BB_DIR_foo and _BB_SUID_fooDenys Vlasenko2011-01-181-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* init/*: move applet/kbuild/config/help bits into applet source filesDenys Vlasenko2010-10-121-0/+62
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* init,halt: portability improvementsJeremie Koenig2010-07-191-13/+1
| | | | | | | | | | | * make init and halt use the same RB_* constants for reboot() * conditionalize the Linux-specific code Inspired by init.init.diff from the Debian kFreeBSD patches at: http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* telnetd: write LOGIN/DEAD_PROCESS utmp records. Closes bug 1363Denys Vlasenko2010-04-051-7/+8
| | | | | | | | | | | | | | | | | function old new delta write_new_utmp - 253 +253 skip_dev_pfx - 30 +30 handle_sigchld 42 72 +30 telnetd_main 1650 1673 +23 make_new_session 415 438 +23 ... login_main 1140 1148 +8 update_utmp 337 313 -24 write_wtmp 220 154 -66 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 11/6 up/down: 406/-115) Total: ~291 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: split update_utmp from login/getty in preparation to use it for telnetdDenys Vlasenko2010-04-051-1/+0
| | | | | | | | | | | | | | | | | | | function old new delta update_utent - 339 +339 login_main 1498 1128 -370 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 339/-370) Total: -31 bytes function old new delta update_utmp 246 337 +91 login_main 1128 1140 +12 getty_main 1908 1918 +10 ... update_utent 339 - -339 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 5/6 up/down: 119/-368) Total: -249 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb.h: tidy it up a bit. no code changes (verified)Denys Vlasenko2009-10-231-1/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* halt/reboot/poweroff: add a CONFIG_xxx to act SysV compatiblyAlexander Shishkin2009-07-271-1/+17
| | | | | Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* halt/reboot/powerdown: accept and ignore -iDenis Vlasenko2009-04-121-5/+9
|
* halt/reboot/poweroff: improve error reportingDenis Vlasenko2009-03-071-1/+1
| | | | | | function old new delta halt_main 207 185 -22
* whitespace fixesDenis Vlasenko2008-09-251-1/+1
|
* halt: reinstate -w even if !FEATURE_WTMP; beautify code in halt.cDenis Vlasenko2008-09-111-29/+35
|
* - halt's -w depends on FEATURE_WTMP (Vladimir Dronnikov)Bernhard Reutner-Fischer2008-09-011-7/+8
|
* halt: signal init regardless of ENABLE_INITDenis Vlasenko2008-08-031-2/+5
|
* - document -fBernhard Reutner-Fischer2008-07-211-2/+2
|
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-1/+1
|
* - use ut_user rather than ut_name (Cristian Ionescu-Idbohrn)Bernhard Reutner-Fischer2008-06-011-4/+1
| | | | | | | | - 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
* *: shrink: use Vladimir's "o+" specifier instead of xatou(opt_param)Denis Vlasenko2008-03-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* *: fix fallout from -Wunused-parameterDenis Vlasenko2008-03-171-1/+1
| | | | | | | | | | | | | | | | | | 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
* halt: write wtmp entry if wtmp support is enabledDenis Vlasenko2008-01-241-5/+38
|
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* don't pass argc in getopt32, it's superfluousDenis Vlasenko2007-08-181-1/+1
| | | | | | | | (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
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* - sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g"Bernhard Reutner-Fischer2007-04-041-2/+2
|
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* PID should be stored in pid_t, not int or long.Denis Vlasenko2006-11-011-11/+16
| | | | | find_pid_by_name() was returning 0 or -1 in last array element, but -1 was never checked. We can use just 0 intead.
* message string changes, mostly for consistency, also -32 bytes in .rodataDenis Vlasenko2006-10-201-1/+1
|
* attempt to regularize atoi mess.Denis Vlasenko2006-10-081-1/+1
|
* bb_applet_name -> applet_nameDenis Vlasenko2006-10-031-1/+1
|
* getopt_ulflags -> getopt32.Denis Vlasenko2006-10-031-1/+1
| | | | | | | | 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.
* Change license statements (and clean up headers) on some of the files thatRob Landley2006-09-221-3/+1
| | | | Erik or I are primary copyright holders on.
* - move #include busybox.h to the very top so we pull in the configBernhard Reutner-Fischer2006-06-021-3/+2
| | | | and eventual platform specific includes in early.
* - provide fallback defines for non-linuxBernhard Reutner-Fischer2006-05-261-1/+13
|