summaryrefslogtreecommitdiff
path: root/libbb/xfuncs.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* libbb,crond,lash: fix getopt32 (don't know how it managed to slip through)Denis Vlasenko2007-08-191-2/+2
| | | | | *: fcntl(fd, F_GETFL) doesn't require third parameter at all.
* introduce and use xdup2(int, int)Denis Vlasenko2007-08-181-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stop checking whether setsockopt_reuseaddr(int fd) was successful (it always is) remove second parameter (sockllen) from xmalloc_sockaddr2xxxxx functions sockaddr2str 142 156 +14 collect_blk 467 474 +7 xdup2 28 33 +5 singlemount 4456 4454 -2 print_host 214 212 -2 nslookup_main 139 137 -2 ftpgetput_main 414 412 -2 udhcpd_main 1258 1255 -3 udhcpc_main 2405 2402 -3 traceroute_main 4125 4122 -3 nc_main 1072 1069 -3 buffer_fill_and_print 76 73 -3 xmalloc_sockaddr2hostonly_noport 18 14 -4 xmalloc_sockaddr2host_noport 18 14 -4 xmalloc_sockaddr2host 15 11 -4 xmalloc_sockaddr2dotted_noport 18 14 -4 xmalloc_sockaddr2dotted 18 14 -4 wget_main 2618 2614 -4 ping_main 393 389 -4 ip_port_str 120 115 -5 dhcprelay_main 1146 1141 -5 dnsd_main 1531 1525 -6 passwd_main 1110 1102 -8 udhcp_kernel_packet 206 197 -9 udhcp_listen_socket 154 144 -10 getty_main 2576 2566 -10 setup 655 640 -15 xmove_fd 51 34 -17 dolisten 759 742 -17 tcpudpsvd_main 1866 1836 -30 startservice 339 299 -40
* v[hp]error_msg have 2-3 callsites only -> incorporate there.Denis Vlasenko2007-08-151-2/+2
|
* httpd: add -v[v]: prints client addresses, HTTP codes returned [and URLs]Denis Vlasenko2007-08-141-5/+7
| | | | | | | | | | | | | | | get_line - 70 +70 packed_usage 22811 22863 +52 handle_incoming_and_exit 2246 2277 +31 httpd_main 1141 1155 +14 sendHeaders 489 482 -7 getLine 77 - -77 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 3/1 up/down: 167/-84) Total: 83 bytes text data bss dec hex filename 774335 1058 11092 786485 c0035 busybox_old 774447 1058 11092 786597 c00a5 busybox_unstripped
* ls,ps,watch: measure terminal width on fd 0, not 1Denis Vlasenko2007-08-091-1/+1
|
* stray trailing tabs removedDenis Vlasenko2007-07-191-2/+2
|
* xioctl and friends by Tito <farmatito@tiscali.it>Denis Vlasenko2007-07-141-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* xpipe: introduce (saves ~170 bytes)Denis Vlasenko2007-05-261-14/+18
| | | | | udhcp/signalpipe.c: use pipe instead of socketpair.
* fix suid config handlingDenis Vlasenko2007-05-021-2/+2
|
* make xsocket die with address family printed (if VERBOSE_RESOLUTION_ERRORS=y)Denis Vlasenko2007-04-131-1/+12
|
* - add xsendto and use where appropriate; shrink iplink; sanitize libiproute ↵Bernhard Reutner-Fischer2007-04-121-0/+16
| | | | | | a bit. -916 byte
* bb_full_fd_action: remove potential xmalloc from NOFORK pathDenis Vlasenko2007-04-111-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* make compressed help code NOMMU- and NOFORK-friendly -Denis Vlasenko2007-04-101-0/+9
| | | | no forking anymore, bunzip2 unpack routine now does all it in memory.
* make a few struct bb_applet members conditionalDenis Vlasenko2007-04-101-1/+1
| | | | | | rename sllep_and_die -> xfunc_die make fflush_stdout_and_exit NOFORK-safe fix some buglets found by randomconfig
* make xfunctions optionally longjump instead of exit.Denis Vlasenko2007-04-091-1/+1
| | | | | use it for making NOFORK more practical. touch: make it a NOFORK applet
* wait4pid: if passed with pid < 0, do not set errno - it is already set by exec!Denis Vlasenko2007-04-091-33/+0
|
* libbb: add xunlink()Denis Vlasenko2007-04-051-0/+6
| | | | patch: do not try to delete same file twice
* tcpsvd: new appletDenis Vlasenko2007-04-011-0/+57
| | | | | | | | | | It's a GPL-ed 'clone' of Dan Bernstein's tcpserver. Author: Gerrit Pape <pape@smarden.org> http://smarden.sunsite.dk/ipsvd/ size tcpsvd.o text data bss dec hex filename 2571 4 16 2591 a1f tcpsvd.o
* ps: work around libc bug: printf("%.*s\n", MAX_INT, buffer)Denis Vlasenko2007-03-281-3/+3
|
* make pidfile writing configurable.Denis Vlasenko2007-03-271-6/+6
| | | | [ui]toa_to_buf: change API. No users yet.
* zcip: make it work on NOMMU (+ improve NOMMU support machinery)Denis Vlasenko2007-03-261-3/+10
| | | | fsck: fix bad English in a comment
* libbb: rework NOMMU helper API so that it makes more senseDenis Vlasenko2007-03-261-78/+0
| | | | and easier to use. Doesn't compile - need two more commits.
* add NOMMU fixme's; move move_fd from runit_lib to libbb; nuke fd_copyDenis Vlasenko2007-03-251-0/+10
|
* applets.c, xfunc.c: style cleanupDenis Vlasenko2007-03-241-8/+8
|
* clean up accumulated whitespace damageDenis Vlasenko2007-03-071-1/+1
|
* new applets: selinux utils by KaiGai Kohei <kaigai@kaigai.gr.jp>Denis Vlasenko2007-02-061-0/+15
|
* Add BB_EXEC[LV]P() which encapsulate FEATURE_EXEC_PREFER_APPLETSDenis Vlasenko2007-02-031-5/+1
| | | | (patch from Gabriel L. Somlo <somlo@cmu.edu>)
* preparatory patch for -Wwrite-strings #2Denis Vlasenko2007-01-291-2/+2
|
* use bb_sanitize_stdio() where appropriateDenis Vlasenko2007-01-271-1/+1
|
* fix warning in find.cDenis Vlasenko2007-01-271-1/+1
|
* fix bin2hex bug. lowercase = uppercase | 0x20, not | 0x10!Denis Vlasenko2007-01-261-2/+2
|
* accumulated post-1.4.0 fixesDenis Vlasenko2007-01-241-3/+4
|
* Introduce FEATURE_EXEC_PREFER_APPLETS = "re-execute our ownDenis Vlasenko2007-01-211-2/+5
| | | | | | executable if we asked to exec someting with argv[0] == known_applet" Use it in init. Also respect PATH in init, remove explicit "/sbin" etc from exec. Patch by Gabriel L. Somlo <somlo@cmu.edu>
* - get_terminal_width_height does not and should never write to fd. Cosmetic ↵Bernhard Reutner-Fischer2007-01-201-1/+1
| | | | Precaution
* openvt,getty,vfork_daemon_rexec,mount: tighten up fd cleanup codeDenis Vlasenko2007-01-191-2/+10
| | | | | | | | | (will close all fd's > 2 on daemonization now) getty: fix "getty -" support, and also do not try to chown/chmod "-" telnetd: fix "lost ctty" bug Yet another attempt on saner function names: bb_sanitize_server_stdio(0/1) -> bb_sanitize_stdio() + bb_daemonize();
* Rename bb_sanitize_stdio -> bb_sanitize_server_stdioDenis Vlasenko2007-01-141-1/+1
| | | | | | (name is still bad - it doesn't hint that function may do daemonization trick for you if asked to). Small fixes to fakeidentd.
* By popular request reinstate fakeidentd's standalone mode.Denis Vlasenko2007-01-141-0/+24
| | | | | | | | | | | Since this is also needed for other applets like telnetd, introduce generic driver for such things. It even supports inetd-wait ('linger') mode, when inetd hands out listen socket to child and waits to it to die, instead of handing out accepted socket and continuing listening itself (nowait mode). Code growth ~200 bytes. NB: our inetd doesn't support wait mode yet (or mabe it is buggy).
* random small size optimizationsDenis Vlasenko2007-01-121-0/+13
|
* missing piece of prev commit: ndelay_offDenis Vlasenko2006-12-241-6/+5
|
* find: fix spurious -exec error messagesDenis Vlasenko2006-12-231-2/+7
| | | | (bug reported by Bernhard Fischer <rep.nop@aon.at>)
* xfuncs.c: dietlibc actually HAS fdprintf!Denis Vlasenko2006-12-181-2/+2
| | | | | platform.h: define strchrnul for dietlibc ash: stop using few non-standard functions
* nc: add missing castDenis Vlasenko2006-12-181-0/+31
| | | | xfuncs: add dprintf for dietlibc
* cut 0.5k off mkfs.minixDenis Vlasenko2006-11-291-1/+4
| | | | assorted strtoul fixes (that's what brought me into minix)...
* small fixes:Denis Vlasenko2006-11-261-11/+19
| | | | | | fix xstrdup to not grossly overallocate memory use xopen instean of xopen3 in several places etc.
* tee: fix bug: argv[-1] is a no-no!Denis Vlasenko2006-11-251-2/+2
| | | | | bb_full_fd_action: optimize die_if_ferror: "<applet>: filename" isn't a good err msg, add "..I/O error"
* tar: fix and sanitize handling of long filenames/linknamesDenis Vlasenko2006-11-241-0/+1
| | | | | | | | | (GNU extensions 'K' and 'L'). We correctly handle them when untarring now, but unfortunately we still don't use them when tarring! That stupid 100 char limit is still there! The biggest problem is that we don't support 'pax' tar format. Linux kernel tarballs are in this format... shame
* telnetd: we were having telnetd with is ONLY inetd or ONLY standalone.Denis Vlasenko2006-11-221-0/+12
| | | | | What if I need to have both?? This patch introduces CONFIG_FEATURE_TELNETD_STANDALONE: y - both, n - only inetd.
* rodata cleanup. "unable to" == "cannot". -300 bytesDenis Vlasenko2006-11-181-2/+2
|
* smart_ulltoa5: make available in libbbDenis Vlasenko2006-11-051-6/+54
|