summaryrefslogtreecommitdiff
path: root/sysklogd/logger.c
Commit message (Collapse)AuthorAgeFilesLines
* *: --help tweaksDenys Vlasenko2021-06-141-1/+1
| | | | | | | function old new delta packed_usage 33589 33552 -37 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* help text: replace [OPTIONS] with actual options (if not too long)Denys Vlasenko2020-12-131-1/+1
| | | | | | | function old new delta packed_usage 33620 33665 +45 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: update size informationDenys Vlasenko2018-12-281-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* syslogd,logger: code shrink for muslDenys Vlasenko2017-08-161-2/+2
| | | | | | | | | | | | | | | | | | function old new delta syslogd_main 1252 1910 +658 logger_main 277 393 +116 timestamp_and_log 434 542 +108 static.__compound_literal - 104 +104 parse_fac_prio_20 137 - -137 pencode 167 - -167 parse_syslogdcfg 715 - -715 ------------------------------------------------------------------------------ (add/remove: 1/3 grow/shrink: 3/0 up/down: 986/-1019) Total: -33 bytes text data bss dec hex filename 912506 563 6132 919201 e06a1 busybox_old 912364 563 6132 919059 e0613 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* do not use `a' quoting style in commentsDenys Vlasenko2017-08-021-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: deindent all help textsDenys Vlasenko2017-07-211-4/+4
| | | | | | 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-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: hopefully all setup_common_bufsiz() are in placeDenys Vlasenko2016-04-211-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sysklogd/*: convert to new-style "one file" appletsDenys Vlasenko2015-10-181-0/+13
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move remaining help text from include/usage.src.hPere Orga2011-04-111-0/+12
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: whitespace fixesDenys Vlasenko2010-10-281-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.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>
* *: remove some uses of argcDenys Vlasenko2010-01-041-3/+2
| | | | | | | | | | | | | | | | | | | | | | | function old new delta whoami_main 34 37 +3 logname_main 60 63 +3 hostid_main 35 38 +3 ttysize_main 136 135 -1 nmeter_main 673 672 -1 logger_main 387 386 -1 uuencode_main 330 328 -2 ifupdown_main 2125 2123 -2 mesg_main 158 155 -3 free_main 333 330 -3 cal_main 902 899 -3 acpid_main 443 440 -3 ar_main 196 189 -7 find_main 476 467 -9 ifconfig_main 1235 1221 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/12 up/down: 9/-49) Total: -40 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: password/group function helpers rewritten by Tito:Denis Vlasenko2008-12-021-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta xgetpwuid - 27 +27 uid2uname_utoa - 22 +22 gid2group_utoa - 22 +22 uid2uname - 18 +18 gid2group - 18 +18 buffer_fill_and_print 179 196 +17 print_user 12 24 +12 print_group 12 24 +12 get_cached 89 99 +10 ... print_common 134 120 -14 vlock_main 415 396 -19 logger_main 410 387 -23 crontab_main 642 609 -33 bb_getpwuid 42 - -42 bb_getgrgid 42 - -42 bb_getug 80 - -80 ------------------------------------------------------------------------------ (add/remove: 6/3 grow/shrink: 9/11 up/down: 187/-296) Total: -109 bytes
* logger: "clean up" a dirty hack a bitDenis Vlasenko2008-06-111-25/+6
|
* - fix conflicting decls of syslog related facilitynames and prioritynames tablesBernhard Reutner-Fischer2008-01-271-19/+23
|
* fix buglets found by randomconfigDenis Vlasenko2007-11-231-2/+2
|
* logread: eliminate usage of data/bssDenis Vlasenko2007-11-231-0/+3
| | | | | | | | | | | | | | | | | ifup: don't remove virtual iface prefixes (eth0:0) function old new delta shbuf 4 - -4 SMrup 6 - -6 SMrdn 12 - -12 static.label_buf 20 4 -16 get_var 158 140 -18 ------------------------------------------------------------------------------ (add/remove: 0/3 grow/shrink: 0/2 up/down: 0/-56) Total: -56 bytes text data bss dec hex filename 783501 962 9260 793723 c1c7b busybox_old 783483 942 9244 793669 c1c45 busybox_unstripped
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* logger: fix a problem of losing all argv except firstDenis Vlasenko2007-10-021-3/+3
|
* 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
* bb_getpwuid, bb_getgrgid: change order of arguments to more intuitive one;Denis Vlasenko2007-07-271-1/+1
| | | | | comment thoroughly when they die and when they dont.
* Audit bb_common_bufsiz usage, add script which looks for misuse.Denis Vlasenko2007-06-041-4/+5
| | | | | | tr: stop using globals needlessly. code: -103 bytes
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* undo RESERVE_CONFIG_BUFFER change. aldot, small on-stack char[N] objectsDenis Vlasenko2007-01-121-9/+7
| | | | are perfectly okay, don't convert them to RESERVE_CONFIG_BUFFERs.
* - shrink by 26 bytes or soBernhard Reutner-Fischer2007-01-091-15/+21
|
* syslogd: start using bb_common_bufsiz1 instead of stack/mallocDenis Vlasenko2007-01-041-35/+19
| | | | | logger: optimize, also use bb_common_bufsiz1 (~40 bytes) tested to eat arbitrarily-sized input at high speed - ok
* attempt to regularize atoi mess.Denis Vlasenko2006-10-081-6/+3
|
* getopt_ulflags -> getopt32.Denis Vlasenko2006-10-031-2/+2
| | | | | | | | 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.
* logger: getopt_ulflags'isationDenis Vlasenko2006-09-221-16/+7
|
* using [xa]sprintf for string concatenation is neat and savesDenis Vlasenko2006-09-091-1/+1
| | | | | ~100 bytes according to bloatcheck. Also this fixes bug in rpm
* - move #include busybox.h to the very top so we pull in the configBernhard Reutner-Fischer2006-06-021-15/+2
| | | | and eventual platform specific includes in early.
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley2006-03-061-1/+1
| | | | definitions. (That should only be on prototypes.)
* - rename libbb's password helpers as suggested in libbb.hBernhard Reutner-Fischer2005-09-201-1/+1
| | | | | | | | my_getpwnam -> bb_xgetpwnam /* dies on error */ my_getgrnam -> bb_xgetgrnam /* dies on error */ my_getgrgid -> bb_getgrgid my_getpwuid -> bb_getpwuid my_getug -> bb_getug
* Removed the incorrect and confusing facility argument specified withPeter Kjellerstedt2005-04-061-3/+3
| | | | | openlog() as the correct facility will be specified with syslog() anyway.
* Tito writes:Eric Andersen2004-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi, I've spent the half night staring at the devilish my_getpwuid and my_getgrgid functions trying to find out a way to avoid actual and future potential buffer overflow problems without breaking existing code. Finally I've found a not intrusive way to do this that surely doesn't break existing code and fixes a couple of problems too. The attached patch: 1) changes the behaviour of my_getpwuid and my_getgrgid to avoid potetntial buffer overflows 2) fixes all occurences of this function calls in tar.c , id.c , ls.c, whoami.c, logger.c, libbb.h. 3) The behaviour of tar, ls and logger is unchanged. 4) The behavior of ps with somewhat longer usernames messing up output is fixed. 5) The only bigger change was the increasing of size of the buffers in id.c to avoid false negatives (unknown user: xxxxxx) with usernames longer than 8 chars. The value i used ( 32 chars ) was taken from the tar header ( see gname and uname). Maybe this buffers can be reduced a bit ( to 16 or whatever ), this is up to you. 6) The increase of size of the binary is not so dramatic: size busybox text data bss dec hex filename 239568 2300 36816 278684 4409c busybox size busybox_fixed text data bss dec hex filename 239616 2300 36816 278732 440cc busybox 7) The behaviour of whoami changed: actually it prints out an username cut down to the size of the buffer. This could be fixed by increasing the size of the buffer as in id.c or avoid the use of my_getpwuid and use getpwuid directly instead. Maybe this colud be also remain unchanged...... Please apply if you think it is ok to do so. The diff applies on today's cvs tarball (2004-08-25). Thanks in advance, Ciao, Tito
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-7/+7
|
* Update a bunch of docs. Run a script to update my email addr.Eric Andersen2003-07-141-2/+1
|
* Major coreutils update.Manuel Novoa III2003-03-191-3/+3
|
* last_patch57 from Vladimir N. OleynikGlenn L McGrath2002-11-101-9/+14
|
* Vodz' last_patch57:Eric Andersen2002-09-301-3/+3
| | | | | | | | | | | | | | | Hi, Erik. my_getpw(uid/gid) and applets used it have problem: if username for uid not found, applets can`t detect it (but code pessent). Also "%8ld " format is bad: spaces not required (applets have self format or spec format (tar applet) and overflow for "id" applet...) This problem also pressent in stable version. Patch for unstable in attach. --w vodz
* Major rework of the directory structure and the entire build system.Eric Andersen2001-10-241-3/+3
| | | | -Erik
* Some patches to make dietlibc work...Eric Andersen2001-07-221-10/+11
|
* Some adjustments, mostly from David McCullough <davidm@lineo.com> toEric Andersen2001-07-191-11/+15
| | | | | | | make busybox be more uClinux friendly. I also adjusted Config.h for uClinux so it will automagically disable apps the arn't going to work without fork() and such. -Erik
* Applied patch from Gennady Feldman to split up syslogd.c into syslogd andMark Whitley2001-03-121-2/+3
| | | | klogd (as it should be).
* It turns out that DODMALLOC was broken when I reorganized busybox.hEric Andersen2001-02-201-1/+2
| | | | | | header file usage before the 0.49 release. To fix it, I had to move the '#include "busybox.h"' to the end of the list of #include files. -Erik
* This patch, put together by Manuel Novoa III, is a merge of workEric Andersen2001-02-141-1/+1
| | | | | | done by Evin Robertson (bug#1105) and work from Manuel to make usage messages occupy less space and simplify how usage messages are displayed.
* Removed trailing \n from error_msg{,_and_die} messages.Matt Kraai2001-01-311-2/+2
|