Commit Graph

725 Commits

Author SHA1 Message Date
Bernhard Reutner-Fischer
ae843e9cc8 - add new applet resize.
text    data     bss     dec     hex filename
    185       0       0     185      b9 console-tools/resize.o
    255       0       0     255      ff console-tools/resize.o.print
2006-09-22 08:18:41 +00:00
Rob Landley
eb84a42fdd The Software Freedom Law Center wants us to add a copyright notice to the
generated binaries, to make copyright enforcement easier.  Our liason with
them (Bradley Kuhn) suggested the following text:

> Copyright (C) YEAR-2006  Erik Andersen, Rob Landley, and others.
> Licensed under GPLv2.  See source distribution for full notice.

And the busybox help message seems the least offensive place to put it.  (At
some point in the future, I need to strip 128 bytes from the binary to feel
good about this, though. :)

Minor header file cleanup while I was there, since libbb.h already #includes
most of that stuff...
2006-09-20 21:41:13 +00:00
Bernhard Reutner-Fischer
d1f939eaf3 - fix documentation for the command-line options of ipcs. Closes #1036 2006-09-20 15:56:53 +00:00
Denis Vlasenko
0b5fd45ef7 change char *string = "foo" -> char string[] = "foo"
function                                             old     new   delta
xsetenv                                               45      44      -1
iproute_list_or_flush                               1834    1833      -1
ipaddr_modify                                       1915    1914      -1
ipaddr_list_or_flush                                1861    1860      -1
invarg                                                39      38      -1
do_set                                              1259    1258      -1
bb_verror_msg                                        268     267      -1
create_icmp_socket                                   142     140      -2
create_icmp6_socket                                  142     140      -2
bb_full_fd_action                                    324     322      -2
bb_path_mtab_file                                     10       -     -10
.rodata                                           214796  214720     -76
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/11 up/down: 0/-99)            Total: -99 bytes
2006-09-19 09:55:09 +00:00
Denis Vlasenko
9213a9e0f2 whitespace cleanup 2006-09-17 16:28:10 +00:00
Bernhard Reutner-Fischer
4d0f54af94 - Steven Scholz pointed out that ssd's make-pid doesn't take an argument. 2006-09-15 19:25:18 +00:00
Rob Landley
69115c656d Unbreak allbareconfig.
We've had -Werror in the tree for quite a while, so adding #warning
somewhat counterproductve way to make comments on the code that belong on the
mailing list anyway.
2006-09-15 04:01:03 +00:00
Denis Vlasenko
25098f7fd5 mount: move code from nfsmount.c into mount.c 2006-09-14 15:46:33 +00:00
Rob Landley
577905f1e4 Revert duplicate patch.
I don't know why patch decided to apply this even though it was already in
the tree.  I thought the other hunks failed because they were totally
unrelated leakage from Bernhard's tree (which they are; was the a reason
for bundling them in with this fix?  Do they have something to do with
the GCC 2.95 fix?  I suspect they prevent me from backporting this
patch to 1.2.2 because the header consolidation into libbb.h hadn't
been done yet, and no I'm not fixing it up: if that's the case then
this patch won't be in 1.2.2 due to extraneous changes bundled with it that
prevent a clean backport without rolling a new patch).
2006-09-12 22:42:03 +00:00
Rob Landley
20cc6d567f Remove pointless "const". Bloatcheck says 0 bytes difference. 2006-09-12 21:42:17 +00:00
Rob Landley
1b2b5cfba8 Fix from Bernhard for somebody trying to limp along with gcc 2.95.4. 2006-09-12 20:29:22 +00:00
Bernhard Reutner-Fischer
b5f50ea344 - small trivia to be gentle to gcc-2.95.x which had no va_copy but only __va_copy. 2006-09-12 13:27:55 +00:00
Denis Vlasenko
00d7d6cef6 nfsmount: sanitize it. It had a rather peculiar idea of implementing "bg"
option - it was going to return a special flag back to caller and
expecting caller to call it again with special parameter! Also
caller was charged with calling mount() syscall...

mount: mtab support was non-functional. Enabling it revealed serious bug
which is not fixed yet.
2006-09-11 17:42:44 +00:00
Bernhard Reutner-Fischer
57b56674a3 - merge xstat.c into xfuncs.c 2006-09-11 09:18:09 +00:00
Rob Landley
69674941dd Error reporting fix for sulogin, plus remove help entries for options we never
implemented.  (Plus a bit more of bbsh leaking in from my tree, but it
shouldn't hurt anything and I'm lazy...)
2006-09-11 00:34:01 +00:00
Denis Vlasenko
2e502914b0 login: style fixes 2006-09-08 17:22:45 +00:00
Denis Vlasenko
a9801658ee getty, sulogin: convert to using bb_msg for syslog output 2006-09-07 16:20:03 +00:00
Denis Vlasenko
3538b9a882 Implement optional syslog logging using ordinary
bb_xx_msg calls, and convert networking/* to it.
The rest of bbox will be converted gradually.
2006-09-06 18:36:50 +00:00
Denis Vlasenko
21afc7dc29 uuencode: common implementation for wget and uuencode (closing bug 694) 2006-09-03 15:49:40 +00:00
Denis Vlasenko
314908da9e tar: revert older fix (non-portable), added new one.
testsuite tar-extracts-all-subdirs now passes.
2006-09-03 14:04:33 +00:00
Denis Vlasenko
2cbe6e6eb2 ping: implement -I option 2006-09-02 16:17:30 +00:00
Bernhard Reutner-Fischer
bfbc4ebf40 - patch from Csaba Henk to make the "User-Agent" header field configurable. 2006-09-02 15:30:26 +00:00
Bernhard Reutner-Fischer
73561cc75a - pull from busybox_scratch: r15829:15850
Various fixes, cleanups and shrinkage:
saves 952 Bytes:
   text    data     bss     dec     hex filename
1087742   15853  790632 1894227  1ce753 ../busybox/busybox.old
1086790   15853  790632 1893275  1ce39b busybox
via:
# scripts/bloat-o-meter ../busybox/busybox_unstripped.old busybox_unstripped 
function                                             old     new   delta
ipcrm_main                                           756     822     +66
getval                                                 -      61     +61
maybe_set_utc                                          -      40     +40
udhcpc_main                                         2896    2912     +16
md5_hash_block                                       428     437      +9
opt                                                    8      16      +8
qgravechar                                           106     110      +4
make_bitmap                                          292     295      +3
inflate_unzip                                       2056    2059      +3
add_partition                                       1412    1414      +2
__parsespent                                         156     158      +2
qrealloc                                              41      42      +1
format                                                 -       1      +1
catv_main                                            313     314      +1
watch_main                                           293     292      -1
varunset                                              81      80      -1
part                                                   1       -      -1
check_if_skip                                        837     836      -1
start_stop_daemon_main                               840     837      -3
create_lost_and_found                                175     172      -3
supress_non_delimited_lines                            4       -      -4
static.l                                               4       -      -4
static.c                                               5       1      -4
bsd_sum_file                                         237     233      -4
eval2                                                338     332      -6
arithmetic_common                                    166     158      -8
cmpfunc                                               22       5     -17
cksum_main                                           294     275     -19
cmp_main                                             465     439     -26
dd_main                                             1535    1508     -27
rmmod_main                                           376     333     -43
cut_file                                             727     644     -83
ipcs_main                                           3809    3721     -88
cut_main                                             722     614    -108
date_main                                           1443    1263    -180
remove_ids                                           222       -    -222
------------------------------------------------------------------------------
(add/remove: 3/4 grow/shrink: 11/18 up/down: 217/-853)       Total: -636 bytes
2006-08-28 23:31:54 +00:00
Rob Landley
abfe107f78 No real need for my_query_module() and this eliminates some type-punned
pointer warning on certain gcc versions (and saves 38 bytes).
2006-08-28 19:40:08 +00:00
Rob Landley
0e4690d4ef Michael Opdenacker contributed a readahead applet. 2006-08-20 22:12:18 +00:00
Rob Landley
b988462d3e Ok, features.h already defines _OPEN_SOURCE (and complains if it's already
defined), yet it's not doing it for scripts/individual for some reason.
(I hate fighting with header files.)
2006-08-10 01:08:41 +00:00
Rob Landley
519d7df930 Another whack at scripts/individual. Now builds 212 applets. 2006-08-09 20:56:23 +00:00
Rob Landley
e55a73c7a8 Update usage to talk about the new shared subtree stuff in mount. 2006-08-09 20:55:35 +00:00
Rob Landley
e3781b7312 Add shared subtree support, suggested by Vladimir Dronnikov. Also break out a
few new (unfinished) config options, which I intend to make hidden (but
enabled) when CONFIG_NITPICK is disabled.  Getting the .config infrastructure
to do that is non-obvious, it seems...
2006-08-08 01:39:49 +00:00
Rob Landley
236c6755d2 Teach md5sum and sha1sum to work the way other applets do so I don't have to
teach scripts/individual new tricks.  And while I'm at it, teach
scripts/individual other new tricks.  Now builds 198 applets, some of which
I should teach it to hardlink together because they're really the same app...
2006-08-06 02:13:36 +00:00
Rob Landley
affb7a61a6 scripts/individual now builds 171 applets. Some of them may even work. :) 2006-08-05 00:41:39 +00:00
Rob Landley
081e38483e Remove xcalloc() and convert its callers to xzalloc(). About half of them
were using "1" as one of the arguments anyway, and as for the rest a multiply
and a push isn't noticeably bigger than pushing two arguments on the stack.
2006-08-03 20:07:35 +00:00
Rob Landley
86b4d64aa3 These should have been part of 15767 too. 2006-08-03 17:58:17 +00:00
Rob Landley
d921b2ecc0 Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
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.)
2006-08-03 15:41:12 +00:00
Mike Frysinger
8840759c61 move lchown/chown define out of specific files and into platform.h where it belongs 2006-07-20 19:31:07 +00:00
"Robert P. J. Day"
eea561871b "formated" -> "formatted" throughout the code base. 2006-07-20 19:02:24 +00:00
Rob Landley
f0623a2c98 Patch from Thaddeus Ternes, adding chuid to start-stop-daemon. 2006-07-17 00:35:07 +00:00
Rob Landley
534374755d Cleaup read() and write() variants, plus a couple of new functions like
xlseek and fdlength() for the new mkswap.
2006-07-16 08:14:35 +00:00
Rob Landley
df822f2606 We need xsetuid() and xsetgid() because per-user process resource limits can
prevent a process from switching to a user that has too many processes, and
when that happens WE'RE STILL ROOT.  See http://lwn.net/Articles/190331/
2006-07-15 23:00:46 +00:00
Rob Landley
c9c1a41c58 A couple things that got tangled up in my tree, easier to check in both than
untangle them:

Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the
signal list to that required by posix (they can specify the numbers for
the rest if they really need them).  (This is preparatory cleanup for adding
a timeout applet like Roberto Foglietta wants.)

Export the itoa (added due to Denis Vlasenko, although it's not quite his
preferred implementation) from xfuncs.c so it's actually used, and remove
several other redundant implementations of itoa and utoa() in the tree.
2006-07-12 19:17:55 +00:00
Rob Landley
ab7d9be17c Patch from Tito to remove pwd_to_spwd (which we don't actually need), with
some #ifdef removal from me.
2006-07-11 16:19:17 +00:00
Rob Landley
1cca9484db Upgrade netcat a lot. Make -e able to take the rest of the command line as
what to exec.  Add -f mode and a brief explanation of how to use it to replace
minicom.  Add -l -l mode so you can turn any command into a server.  And group
all of netcat's command line options under two CONFIG entries, so if you
disable both it doesn't use getopt at all.
2006-07-10 19:45:20 +00:00
Rob Landley
4ae905a31c Minor build tweaks that save 1100 bytes building busybox on Ubuntu 6.06. 2006-07-06 17:22:54 +00:00
"Robert P. J. Day"
63fc1a9e08 Standardize on the vi editing directives being on the first line. 2006-07-02 19:47:05 +00:00
Rob Landley
12d9419273 Revert taskset for 1.2.0. It emits a warning, breaks building under RH9,
and nobody seemed interested in fixing it despite repeated complaints.
I'll worry about it in the 1.3 timeframe...
2006-06-30 22:20:43 +00:00
Rob Landley
7077ea30f5 Some old kernel headers don't #include BLKSSZGET in sys/mount.h. 2006-06-29 19:00:12 +00:00
Mike Frysinger
cc826d74e4 cleanup patch usage 2006-06-28 00:22:32 +00:00
Mike Frysinger
cd68a2e1a8 fix watchdog on no-mmu systems by adding -F option for rexec 2006-06-26 21:31:17 +00:00
Rob Landley
ef10d52745 Upgrade mdev to allow commands to be run on create/delete.
Both Jason Schoon and Giuseppe Ciotta deserve credit for this, I used elements
of both.  It's been upgraded so that you can specify that a given command
should run at create, at delete, or at both using different special characters
(@, $, and * respectively).  It uses the system() method of running command
lines which means you can use environment variables on the command line (it
sets $MDEV to the name of the current device being created/deleted, which is
useful if you matched it via regex), and the documentation warns that you need
a /bin/sh to make that work, so you probably want to pick a default shell.
2006-06-26 14:11:33 +00:00
Rob Landley
e1ee482684 Document mount's new error return conventions. 2006-06-24 22:39:19 +00:00