aboutsummaryrefslogtreecommitdiff
path: root/procps/sysctl.c
AgeCommit message (Collapse)Author
2020-06-09sysctl: do report EACCES errors on writeDenys Vlasenko
function old new delta sysctl_act_recursive 165 179 +14 sysctl_act_on_setting 467 471 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 18/0) Total: 18 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-02-08sysctl: fix compatibility with procps sysctlAaro Koskinen
Busybox sysctl is incompatible with procps when '.' appears in directory name, mostly happens with VLANs. busybox syntax (since 2008): net.ipv4.conf.eth0.100.mc_forwarding procps syntax (since 2002): net.ipv4.conf.eth0/100.mc_forwarding (supported by both: net/ipv4/conf/eth0.100/mc_forwarding) Use procps syntax for output; for input, allow both. function old new delta sysctl_dots_to_slashes 86 143 +57 sysctl_act_on_setting 443 453 +10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 67/0) Total: 67 bytes Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-02-08sysctl: do slash/dot conversions only on name, not value partDenys Vlasenko
function old new delta sysctl_dots_to_slashes 71 86 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-02-08sysctl: on EIO ("sysctl net.ipv6.conf.all.stable_secret") set nonzero exitcodeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-02-08sysctl: avoid stat() on every item if in -w modeDenys Vlasenko
function old new delta sysctl_act_recursive 163 167 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-02-08sysctl: allow setting empty valuesDenys Vlasenko
function old new delta sysctl_act_on_setting 451 445 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-12-28config: update size informationDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-05sysctl: make it NOEXECDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-05sysctl: recognize ";comment" and "<whitespace>#comment" linesDenys Vlasenko
function old new delta config_read 639 699 +60 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-05libbb: make trim() return pointer to terminating NULDenys Vlasenko
function old new delta trim 80 90 +10 angle_address 56 50 -6 sysctl_main 282 273 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: +10/-15) Total: -5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-05sysctl: fix file parsing, do not require -w for VAR=VALDenys Vlasenko
function old new delta sysctl_act_on_setting - 451 +451 sysctl_main 222 282 +60 packed_usage 31744 31793 +49 config_read 604 639 +35 sysctl_act_recursive 612 163 -449 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/1 up/down: 595/-449) Total: 146 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-21config: deindent all help textsDenys Vlasenko
Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-18Update menuconfig items with approximate applet sizesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all procps/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-24sysctl: do not error out showing write-only data. Closes 6386Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14whitespace fixes. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-05sysctl: implement -qJoshua Kahlenberg
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>
2012-03-08libbb: make xchroot do a chdir("/") after chrootDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05*: remove "Options:" string from help textsDenys Vlasenko
function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-11move remaining help text from include/usage.src.hPere Orga
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-29whitespace cleanupDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
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>
2010-06-21bootchartd: added optional compat featuresDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-27sysctl: tiny code shrinkDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-10sysctl: stop abusing parser->lineDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-03-29sysctl: move code around to get rid of forward references.Denis Vlasenko
(incidentally it helps gcc to make code smaller)
2009-03-29sysctl: fix broken -p [file] - close bug 231Denis Vlasenko
2009-03-09*: move get_sock_lsa and xwrite_str to libbb, use where appropriateDenis Vlasenko
function old new delta get_sock_lsa - 72 +72 buffer_fill_and_print 179 196 +17 parse_expr 824 832 +8 read_base64 343 348 +5 nameval 202 206 +4 fbset_main 1694 1698 +4 expand 1849 1853 +4 udhcp_send_kernel_packet 249 252 +3 udhcp_get_option 223 222 -1 chat_main 1246 1245 -1 pack_gzip 1661 1659 -2 doset 299 297 -2 bb__parsespent 119 117 -2 test_main 260 257 -3 qgravechar 109 106 -3 tcpudpsvd_main 1834 1830 -4 sysctl_display_all 589 580 -9 xopen_xwrite_close 44 33 -11 prs 30 18 -12 find_main 418 406 -12 full_write2_str 25 12 -13 adduser_main 667 654 -13 evaltreenr 817 802 -15 evaltree 817 802 -15 tftpd_main 526 493 -33 ftpd_main 2050 1990 -60 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 7/18 up/down: 117/-211) Total: -94 bytes
2009-01-08sysctl: fix another corner case with "dots and slashes"Denis Vlasenko
2008-12-29sysctl: fix gcc warning (false positive)Denis Vlasenko
2008-12-24*: tweak error messagesDenis Vlasenko
sysctl: shrink; support recursing if name is a directory: "sysctl net.ipv4.conf". Patch by xmaks AT email.cz text data bss dec hex filename 793659 504 7492 801655 c3b77 busybox_old 793576 504 7492 801572 c3b24 busybox_unstripped
2008-10-15sysctl: sysctl -a was still misbehaving, fix itDenis Vlasenko
2008-10-15return accidentally deleted "/* vi: set sw=4 ts=4: */"Denis Vlasenko
2008-10-15sysctl: fix bug 3894 _for real_.Denis Vlasenko
2008-10-15sysctl: remove trivial comments. no code changesDenis Vlasenko
2008-10-15sysctl: remove special-cased reporting of EPERM,Denis Vlasenko
common code path gives nearly the same message. -50 bytes
2008-10-15sysctl: fix bug 3894 (by Kryzhanovskyy Maksym)Denis Vlasenko
function old new delta sysctl_dots_to_slashes - 47 +47 sysctl_write_setting 310 298 -12 sysctl_read_setting 296 284 -12 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 47/-24) Total: 23 bytes
2008-07-26fix several problems with config parser:Denis Vlasenko
a bug where it underflows the string a bug where it never frees parser_t struct make read_config() return 0 if parser is NULL, make config_close() accept and ignore NULL parser - eliminates many if() blocks reverse the sense of parser bit flags - negative flags are harder to grok. hexdump: revert the change to use config parser, it is BIGGER and also requires additional quirks in parser *: explicitly use PARSER_NORMAL instead of 0 function old new delta login_main 1575 1596 +21 config_close 18 29 +11 bbunpack 383 391 +8 qgravechar 106 109 +3 rtnl_tab_initialize 121 117 -4 expand 1697 1693 -4 man_main 717 712 -5 nameif_main 674 668 -6 hexdump_main 597 591 -6 read_config 217 209 -8 dnsd_main 1478 1470 -8 sysctl_main 203 189 -14 config_open2 44 25 -19 make_device 1177 1141 -36 config_read 597 549 -48 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/11 up/down: 43/-158) Total: -115 bytes
2008-07-21libbb: [x]fopen_for_{read,write} introduced and used.Denis Vlasenko
(by Valdimir) function old new delta config_open2 - 41 +41 config_read 507 542 +35 find_pair 169 187 +18 fopen_for_write - 14 +14 fopen_for_read - 14 +14 find_main 406 418 +12 xfopen_for_write - 10 +10 xfopen_for_read - 10 +10 popstring 134 140 +6 parse_inittab 396 401 +5 next_token 923 928 +5 pack_gzip 1659 1661 +2 bb__parsespent 117 119 +2 fallbackSort 1719 1717 -2 evalvar 1376 1374 -2 qrealloc 36 33 -3 ... ... ... ... singlemount 4579 4569 -10 process_stdin 443 433 -10 patch_main 1111 1101 -10 ifupdown_main 2175 2165 -10 file_action_grep 90 80 -10 uuidcache_init 649 637 -12 hush_main 797 785 -12 read_config 230 217 -13 dpkg_main 3835 3820 -15 read_line_input 3134 3110 -24 sysctl_main 232 203 -29 config_open 40 10 -30 WARN_BAD_LINE 44 - -44 login_main 1714 1575 -139 ------------------------------------------------------------------------------ (add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737) Total: -563 bytes
2008-07-20libbb: fixes to config_read() by maintainerDenis Vlasenko
sysctl: use config_read() function old new delta sysctl_main 121 232 +111 config_read 478 502 +24 parse_main 239 241 +2 sysctl_preload_file_and_exit 234 - -234 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 3/0 up/down: 137/-234) Total: -97 bytes
2008-07-05*: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko
2008-03-17*: add -Wunused-parameter; fix resulting breakageDenis Vlasenko
function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
2007-11-29sysctl: add -e: supress warnings about invalid key (Jeremy Kerr <jk@ozlabs.org>)Denis Vlasenko
code shrink: text data bss dec hex filename 775565 929 9100 785594 bfcba busybox_old 775296 929 9100 785325 bfbad busybox_unstripped
2007-10-29syscall: code shrinkDenis Vlasenko
text data bss dec hex filename 777209 974 9676 787859 c0593 busybox_old 777042 974 9676 787692 c04ec busybox_unstripped
2007-10-11add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-08-12trylink: produce even more info about final link stageDenis Vlasenko
trylink: explain how to modify link and drastically decrease amount of padding (unfortunately, needs hand editing ATM). *: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts size saving: 0.5k
2007-05-26usage.c: remove reference to busybox.hDenis Vlasenko
*: s/include "busybox.h"/include "libbb.h"
2007-04-12style fixes. No code changesDenis Vlasenko
2007-04-11bb_full_fd_action: remove potential xmalloc from NOFORK pathDenis Vlasenko
cat: stop using stdio.h opens libbb: introduce & use open[3]_or_warn function old new delta open3_or_warn - 54 +54 bb_cat 115 144 +29 open_or_warn - 25 +25 unlzma 2404 2412 +8 chattr_main 334 339 +5 xstrtoul_range_sfx 251 255 +4 telnet_main 1514 1510 -4 static.opt 4 - -4 qgravechar 122 118 -4 fuser_add_pid 61 54 -7 fuser_add_inode 154 147 -7 writeFileToTarball 1542 1534 -8 refresh 1156 1148 -8 do_show 856 846 -10 read_leases 212 200 -12 setup_redirects 236 222 -14 iproute_list_or_flush 1582 1568 -14 read_config 427 411 -16 write_leases 284 264 -20 hash_file 338 318 -20 copy_file 1760 1740 -20 do_iproute 2610 2588 -22 bb_full_fd_action 320 269 -51 open_to_or_warn 103 49 -54 fuser_main 1660 1596 -64 .rodata 131160 131096 -64 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 4/19 up/down: 125/-423) Total: -298 bytes
2007-02-03suppress warnings about easch <applet>_main() havingDenis Vlasenko
no preceding prototype