aboutsummaryrefslogtreecommitdiff
path: root/networking/ifconfig.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* help text tweaksDenys Vlasenko2020-12-131-1/+1
| | | | | | | function old new delta packed_usage 33547 33545 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* decrease padding: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nillyDenys Vlasenko2020-11-301-2/+2
| | | | | | | | text data bss dec hex filename 1021236 559 5052 1026847 fab1f busybox_old 1021120 559 5052 1026731 faaab busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: drop PLATFORM_LINUXRon Yorston2020-08-131-1/+0
| | | | | | | | | | | | | | | PLATFORM_LINUX is a hidden configuration option which is disabled by default and enabled at over a hundred locations for features that are deemed to be Linux specific. The only effect of PLATFORM_LINUX is to control compilation of libbb/match_fstype.c. This file is only needed by mount and umount. Remove all references to PLATFORM_LINUX and compile match_fstype.c if mount or umount is enabled. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: reduce the overhead of single parameter bb_error_msg() callsJames Byrne2019-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower overhead call to bb_perror_msg() when only a string was being printed with no parameters. This saves space for some CPU architectures because it avoids the overhead of a call to a variadic function. However there has never been a simple version of bb_error_msg(), and since 2007 many new calls to bb_perror_msg() have been added that only take a single parameter and so could have been using bb_simple_perror_message(). This changeset introduces 'simple' versions of bb_info_msg(), bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and bb_herror_msg_and_die(), and replaces all calls that only take a single parameter, or use something like ("%s", arg), with calls to the corresponding 'simple' version. Since it is likely that single parameter calls to the variadic functions may be accidentally reintroduced in the future a new debugging config option WARN_SIMPLE_MSG has been introduced. This uses some macro magic which will cause any such calls to generate a warning, but this is turned off by default to avoid use of the unpleasant macros in normal circumstances. This is a large changeset due to the number of calls that have been replaced. The only files that contain changes other than simple substitution of function calls are libbb.h, libbb/herror_msg.c, libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c, networking/udhcp/common.h and util-linux/mdev.c additonal macros have been added for logging so that single parameter and multiple parameter logging variants exist. The amount of space saved varies considerably by architecture, and was found to be as follows (for 'defconfig' using GCC 7.4): Arm: -92 bytes MIPS: -52 bytes PPC: -1836 bytes x86_64: -938 bytes Note that for the MIPS architecture only an exception had to be made disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h) because it made these files larger on MIPS. Signed-off-by: James Byrne <james.byrne@origamienergy.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* networking/interface.c: get rid of global "smallint interface_opt_a"Denys Vlasenko2018-03-051-3/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace and comment format fixes, no code changesDenys Vlasenko2017-10-051-3/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: deindent all help textsDenys Vlasenko2017-07-211-12/+12
| | | | | | 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>
* Convert all networking/* applets to "new style" applet definitionsDenys Vlasenko2016-11-231-0/+51
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix build error with musl libc due to if_slip.hDenys Vlasenko2013-08-151-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* networking: code shrinkBartosz Golaszewski2013-07-251-43/+0
| | | | | | | | | | | | | function old new delta in_ether - 124 +124 hexchar2int 42 - -42 ifconfig_main 1237 1106 -131 ether_input 141 - -141 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 0/1 up/down: 124/-314) Total: -190 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifconfig: do not accept "ifconfig eth0 up 1.2.3.4/17" (ip with mask). Closes ↵Denys Vlasenko2013-01-201-87/+80
| | | | | | | | | 5786 function old new delta ifconfig_main 1221 1237 +16 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace fixes. no code changesDenys Vlasenko2013-01-141-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: simplify Ethernet header includesDan Fandrich2011-06-101-8/+4
| | | | | Signed-off-by: Dan Fandrich <dan@coneharvesters.com> 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/+21
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* better shared strings trickDenys Vlasenko2010-09-011-1/+1
| | | | | | | | text data bss dec hex filename 861980 441 7540 869961 d4649 busybox_old 861914 441 7540 869895 d4607 busybox_unstripped 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>
* more thorough fix for systems with strange socklen_tDenys Vlasenko2010-02-021-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove some uses of argcDenys Vlasenko2010-01-041-6/+4
| | | | | | | | | | | | | | | | | | | | | | | 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>
* *: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko2009-04-211-1/+1
| | | | | | and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
* libbb: add strncpy_IFNAMSIZDenis Vlasenko2008-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | function old new delta ... udhcp_read_interface 225 220 -5 brctl_main 1151 1146 -5 add_interface 109 104 -5 ipaddr_list_or_flush 2174 2167 -7 do_add_ioctl 88 80 -8 vconfig_main 249 240 -9 do_del_ioctl 78 68 -10 do_iplink 1186 1173 -13 do_if_fetch 766 753 -13 buffer_fill_and_print 196 179 -17 parse_args 1709 1684 -25 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/20 up/down: 11/-140) Total: -129 bytes
* networking/interface.c: fix indentationDenis Vlasenko2008-06-041-9/+1
|
* two fixlets for -WallDenis Vlasenko2008-05-171-1/+1
|
* - fix bug where we incorrectly rejected ifconfig eth0 hw ether $whateverBernhard Reutner-Fischer2008-05-161-3/+11
| | | | - add support for printing ipoib to ifconfig
* *: s/IF_NAMESIZE/IFNAMSIZ/, regularize its use a bit.Denis Vlasenko2008-04-211-1/+1
| | | | | | | | | | | | | | | function old new delta strncpy_IFNAMSIZ - 13 +13 set_slave_mtu 39 37 -2 set_slave_hwaddr 52 50 -2 set_master_hwaddr 52 50 -2 set_if_flags 40 38 -2 get_if_settings 101 98 -3 ifenslave_main 1680 1661 -19 vconfig_main 306 280 -26 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/7 up/down: 13/-56) Total: -43 bytes
* - be C99 friendly. Anonymous unions are a GNU extension. This change isBernhard Reutner-Fischer2008-01-291-3/+3
| | | | | size-neutral WRT -std=gnu99 and fixes several compilation errors for strict C99 mode.
* ifconfig: code shrinkDenis Vlasenko2007-11-041-44/+44
| | | | | | | | | | | adjtimex: code shrink libbb: move nth_string function into libbb hdparm: nth_string was here text data bss dec hex filename 730013 10334 12032 752379 b7afb busybox_old 730093 10134 12032 752259 b7a83 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
* xioctl and friends by Tito <farmatito@tiscali.it>Denis Vlasenko2007-07-141-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta do_iptunnel 203 977 +774 process_dev 5328 5494 +166 ioctl_or_perror - 54 +54 ioctl_or_perror_and_die - 51 +51 ioctl_alt_func - 49 +49 bb_ioctl_or_warn - 47 +47 do_add_ioctl 102 145 +43 bb_xioctl - 39 +39 print_value_on_off - 31 +31 get_lcm 105 123 +18 arp_main 2155 2167 +12 .................. zcip_main 1576 1566 -10 setlogcons_main 92 82 -10 dumpkmap_main 263 253 -10 do_get_ioctl 85 75 -10 setkeycodes_main 165 154 -11 write_table 244 232 -12 vconfig_main 318 306 -12 do_del_ioctl 93 81 -12 set_address 75 62 -13 maybe_set_utc 30 16 -14 loadfont_main 495 479 -16 slattach_main 712 695 -17 do_loadfont 191 174 -17 do_iplink 1155 1136 -19 getty_main 2583 2562 -21 fbset_main 2058 2035 -23 do_time 588 565 -23 xioctl 25 - -25 read_rtc 186 160 -26 parse_conf 1299 1270 -29 udhcp_read_interface 269 239 -30 bb_ioctl 45 - -45 bb_ioctl_alt 70 - -70 bb_ioctl_on_off 78 - -78 .rodata 129370 129018 -352 do_show 799 - -799 ------------------------------------------------------------------------------ (add/remove: 6/5 grow/shrink: 13/49 up/down: 1316/-1864) Total: -548 bytes text data bss dec hex filename 675352 2740 13968 692060 a8f5c busybox_old 674804 2740 13968 691512 a8d38 busybox_unstripped
* Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms ↵Denis Vlasenko2007-06-251-1/+1
| | | | <wharms@bfs.de>)
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* assorted fixes uncovered by randomconfig runsDenis Vlasenko2007-03-221-1/+2
|
* ifconfig: support (by ignoring it) "inet" before IP address or hostnameDenis Vlasenko2007-03-221-0/+2
|
* ifconfig: use IPv6 infrastructureDenis Vlasenko2007-02-041-27/+26
|
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* properly export externs thru *.h filesDenis Vlasenko2006-12-261-5/+0
|
* style fixesDenis Vlasenko2006-12-261-1/+1
| | | | last xcalloc replaced by xzalloc
* A bunch of defined(__GLIBC__) added. static-linking warning expandedDenis Vlasenko2006-12-181-1/+1
|
* style cleanup: return(a) -> return a, part 2Denis Vlasenko2006-11-271-1/+1
|
* ifconfig: do not try to continue on errors. not much sence in doing thatDenis Vlasenko2006-11-271-104/+58
| | | | IMHO, but requires extra code.
* bb_INET_default[] is really just a const "default",Denis Vlasenko2006-11-211-1/+1
| | | | nothing INET-specific
* ifconfig: looks like char host[128] is not really needed.Denis Vlasenko2006-11-211-4/+6
|
* ifconfig: preparatory patch, no code changesDenis Vlasenko2006-11-211-42/+42
|
* add -Wundef, fix uncovered bugsDenis Vlasenko2006-11-171-1/+1
|
* attempt to regularize atoi mess.Denis Vlasenko2006-10-081-1/+2
|
* Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley2006-08-031-9/+1
| | | | | | | | | | things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
* - patch from Denis Vlasenko to add and use bb_xsocket() and to useBernhard Reutner-Fischer2006-04-121-11/+3
| | | | | bb_xopen some more while at it. Also use shorter boilerplate while at it.
* Can't store a pointer in an int on 64 bit platforms.Rob Landley2005-11-221-1/+1
|
* - remove superfluous C statements ";;" in decompress_unzip.c, dpkg_deb.c ↵Bernhard Reutner-Fischer2005-10-071-1/+1
| | | | | | | ifconfig.c - gzip.c: see if O_NOFOLLOW is defined before using it, else take alternate path closes bug #221 (partially; The rest will follow later).