aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* syslogd: add option to log to Linux kernel printk bufferPeter Korsgaard2013-01-062-1/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why invent our own shared memory circular buffer when the kernel has a perfectly fine one already? This can be used as a smaller/simpler alternative to the syslogd IPC support (as IPC shmem/klogd/logread aren't needed), while also allowing centralised logging of everything (kernel messages, userspace bootup and syslog) when used together with ttyprintk. Notice that kernel 3.5+ is needed to store syslog facility in printk buffer, otherwise only the priority is stored. bloat-o-meter compared to IPC+klogd+logread: function old new delta get_linux_version_code - 84 +84 lbb_prepare 25 90 +65 applet_nameofs 6 - -6 static.stdout@@GLIBC_2 8 - -8 applet_names 23 9 -14 bb_msg_standard_output 16 - -16 init_sem 18 - -18 xatoull_range 19 - -19 overlapping_strcpy 21 - -21 init_data 56 32 -24 applet_main 24 - -24 main 124 99 -25 full_write2_str 26 - -26 error_exit 26 - -26 bb_basename 30 - -30 sem_up 32 - -32 interrupted 35 - -35 fflush_stdout_and_exit 38 - -38 bb_banner 46 - -46 find_applet_by_name 59 - -59 bb_signals_recursive_norestart 90 - -90 run_applet_no_and_exit 104 - -104 timestamp_and_log 651 523 -128 syslogd_main 798 581 -217 xstrtoull_range_sfx 267 - -267 run_applet_and_exit 432 - -432 klogd_main 490 - -490 logread_main 508 - -508 .rodata 1870 937 -933 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 2/26 grow/shrink: 1/6 up/down: 149/-11829) Total: -11680 bytes Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* klogd: handle multi-char log levelsPeter Korsgaard2013-01-051-5/+2
| | | | | | | | | | | | | | Since Linux 3.5 (7ff9554bb5: printk: convert byte-buffer to variable-length record buffer), klog buffer can now contain log lines with multi-char loglevel indicators (<[0-9]+>) - So use strtoul to parse it. function old new delta klogd_main 490 525 +35 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 35/0) Total: 35 bytes Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* dmesg: handle multi-char log levelsPeter Korsgaard2013-01-051-7/+6
| | | | | | | | | | | | | | | | Since Linux 3.5 (7ff9554bb5: printk: convert byte-buffer to variable-length record buffer), klog buffer can now contain log lines with multi-char loglevel indicators (<[0-9]+>) - So we can no longer just skip 3 bytes. Instead skip past the terminating '>' like util-linux does. function old new delta dmesg_main 266 280 +13 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 13/0) Total: 13 bytes Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* powertop: fix error messageLauri Hintsala2013-01-041-1/+1
| | | | | | | | Application tries to use timer_stats module instead of cpufreq_stats. Error message is printed if opening of the file /proc/timer_stats fails. Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ifenslave: fix missing close parenMike Frysinger2012-12-261-1/+1
| | | | | Reported-by: David J Cozatt <ygdrasil@comcast.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* CONFIG_PID_FILE_PATH: new configuration option for pidfile pathsAnthony G. Basile2012-12-199-9/+30
| | | | | | | | | | | | | | | We set a default path for the directory where pidfiles are create when FEATURE_PIDFILE is selected. The default has no effect on applets which must specify a pidfile path on the command line to run, and it can be overridden by applets which optionally allow the user to specify the pidfile path. We also add pidfile write/remove support for klogd, ntpd and watchdog. For syslogd, we add a missing remove_pidfile() for better cleanup on daemon exit. Signed-off-by: Anthony G. Basile <blueness@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* du: document incompatibility with standard toolDenys Vlasenko2012-12-141-0/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* decompress_uncompress: comment out a bigger chunk of debug codeDenys Vlasenko2012-12-051-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* decompress_uncompress: comment out debug printout on corrupted dataDenys Vlasenko2012-12-051-1/+2
| | | | | | | | | | 99% plus of all people who'll get corrupted archive wouldn't bother debugging it. The rest can uncomment the code. function old new delta unpack_Z_stream 1304 1234 -70 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* decompress_uncompress: move 'code' variable into loop - sole userDenys Vlasenko2012-12-051-13/+14
| | | | | | Apparently, gcc does this optimization itself, since generated code is the same. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix a memory leakJon Tollefson2012-11-131-0/+2
| | | | | | | | | | | | | | | The script which triggers the leak: while true do while true do break; done</dev/null done Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* volume_id: add exFAT detectionS-G Bergh2012-11-135-0/+145
| | | | | | | | function old new delta volume_id_probe_exfat - 294 +294 Signed-off-by: S-G Bergh <sgb@systemasis.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifupdown: code shrinkDenys Vlasenko2012-11-091-7/+4
| | | | | | | function old new delta execute 571 548 -23 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifupdown: remove unused errno assignmentsDenys Vlasenko2012-11-051-6/+3
| | | | | | | function old new delta execute 607 571 -36 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifupdown: simple code shrinkDenys Vlasenko2012-11-051-2/+2
| | | | | | | function old new delta execute 631 607 -24 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* blkid: show filesystem when both label and UUID are missing, but type is knownS-G Bergh2012-11-051-1/+5
| | | | | Signed-off-by: S-G Bergh <sgb@systemasis.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: use pkg-config to look up selinux libsMike Frysinger2012-10-202-1/+12
| | | | | | | | Newer versions of libselinux has started linking against more libs. Rather than continuing hardcoding things, switch to using pkg-config to query for its dependencies. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fbsplash: fix regression from e4fa7b7Timo Teräs2012-10-171-3/+2
| | | | | | | | commit e4fa7b7 (limit progress bar flicker) made the progress bar counter unsigned causing i < 0 to never come true. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nanddump: invert the meaning of the -o parameter to match upstreamBaruch Siach2012-10-151-4/+4
| | | | | Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nanddump: skip bad blocks when instructed to do soBaruch Siach2012-10-151-1/+1
| | | | | Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nanddump: use the right operator of logic ANDBaruch Siach2012-10-151-1/+1
| | | | | Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mktemp: fix mktemp -u temp.XXXXXX returning garbage when TMPDIR is setRon Yorston2012-10-081-21/+19
| | | | | | | | | | Use mktemp instead of tempnam for compatibility with real mktemp. Don't let mktemp fail silently, print some simple error messages. Don't ignore -q. Signed-off-by: Tito Ragusa <farmatito@tiscali.it> Signed-off-by: Ron Yorston <rmy@tigress.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* adduser: make it accept "adduser USER GROUP" formTito Ragusa2012-10-081-8/+14
| | | | | | | Signed-off-by: Tito Ragusa <farmatito@tiscali.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mark get_shell_name FAST_FUNCDenys Vlasenko2012-10-032-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* top/ps: argv0:"gdm-session-worker [pam/gdm-password]" == comm:"gdm-session-wor"Denys Vlasenko2012-10-021-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: implement export -nDenys Vlasenko2012-10-011-4/+26
| | | | | | | function old new delta exportcmd 129 175 +46 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* brctl: fix description and usageNicolas Thill2012-09-292-4/+4
| | | | | | | | brctl uncorrectly displays the "showmacs" command as being supported while it is not, remove it from the usage and Config.src file. Signed-off-by: Nicolas Thill <nico@openwrt.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc[6]: allow discover_retries == 0 (infinite)Felix Fietkau2012-09-272-4/+4
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* flashcp: remove unused variable optsManuel Zerpies2012-09-271-2/+1
| | | | | Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: in !EDITING config, return -1 on fgets errorDenys Vlasenko2012-09-271-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix unsafe bb_perror_msg(filename) callsDenys Vlasenko2012-09-272-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* scripts/kconfig/mconf: work on systems w/o SIGWINCHDenys Vlasenko2012-09-271-5/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: correctness/size tweaks in signal-related helpersDenys Vlasenko2012-09-272-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* top: do not touch stdin if -bDenys Vlasenko2012-09-261-10/+16
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* modprobe_small: make rmmod to NOT remove dependencies. Closes 5162Denys Vlasenko2012-09-251-2/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: trivial fixes for compile failuresDenys Vlasenko2012-09-251-5/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* top: fix build failure in !USE_TERMIOS caseDenys Vlasenko2012-09-251-17/+20
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ps: fix build failure in !DESKTOP caseDenys Vlasenko2012-09-251-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* top: implement scrolling up/down (_very_ useful)Denys Vlasenko2012-09-212-74/+110
| | | | | | | | | | | | | function old new delta handle_input 494 564 +70 top_main 928 947 +19 display_topmem_process_list 363 381 +18 display_process_list 1442 1453 +11 clearmems 38 28 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/1 up/down: 118/-10) Total: 108 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ushcpc: gracefully handle packets with CHECKSUM_PARTIALAlexey Froloff2012-09-171-8/+49
| | | | | | | | | | | function old new delta udhcp_recv_raw_packet 415 579 +164 change_listen_mode 317 370 +53 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 217/0) Total: 217 bytes Signed-off-by: Alexey Froloff <raorn@raorn.name> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* telnet: convert Enter -> CR LF in line mode tooDenys Vlasenko2012-09-171-11/+18
| | | | | | | function old new delta handle_net_output 87 98 +11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* telnet: shrink literal string sizeDenys Vlasenko2012-09-171-4/+4
| | | | | | | | text data bss dec hex filename 888483 497 7584 896564 dae34 busybox_old 888450 497 7584 896531 dae13 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* telnet: convert CR -> CR LF, not CR -> CR NUL when sending data to serverDenys Vlasenko2012-09-132-17/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fbsplash: support non-RGB565 pixels in 16-bit modeLinus Walleij2012-09-061-5/+22
| | | | | | | | | function old new delta fbsplash_main 953 989 +36 fb_pixel_value 80 110 +30 Signed-off-by: Linus Walleij <triad@df.lth.se> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: make -mindepth N -xdev correctly stop on mountpointsDenys Vlasenko2012-09-061-14/+21
| | | | | | | function old new delta fileAction 153 193 +40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix "read -s" + ^C. Closes 5504Denys Vlasenko2012-09-062-1/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* top: fix "last CPU" parsingDenys Vlasenko2012-09-061-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sysctl: implement -qJoshua Kahlenberg2012-09-051-13/+19
| | | | | | | | | | function old new delta packed_usage 29208 29223 +15 sysctl_act_recursive 605 598 -7 sysctl_main 233 222 -11 Signed-off-by: Joshua Kahlenberg <jbkberg@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* refactor correct_password.c to avoid one ifwalter harms2012-09-041-6/+3
| | | | | Signed-off-by: walter harms <wharms@bfs.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: stop .eh_frame generationDenys Vlasenko2012-09-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | From Rich Felker: By default, modern GCC generates DWARF2 debug/unwind tables in the .eh_frame section of the object files/binaries. This adds significant bloat (as much as 15%) to the size of the busybox binary, including the portion mapped/loaded into memory at runtime (possibly a big issue for NOMMU targets), and the section is not strippable with the strip command due to being part of the loaded program text. I've since done some further checking - both testing and asking the GCC developers about it - and it seems the solution is to add to the CFLAGS -fno-unwind-tables and -fno-asynchronous-unwind-tables. If debugging is disabled, this will prevent GCC from outputting DWARF2 tables entirely. But since busybox builds with -g by default, the interesting case is what happens then. I originally thought these options would break debugging, but they don't; instead, they tell GCC to output the DWARF2 tables in the .debug_frame section instead of the newish .eh_frame section (used for exception handling). With these options added, busybox_unstripped is still fully debuggable, and the final busybox binary loses the 15% bloat factor from the DWARF2 tables. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>