Rob Landley
403777ffae
Patch from tito to improve options parsing.
2006-08-03 20:22:37 +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
Rob Landley
c052576821
Tito said that strings is a complete rewrite.
2006-07-31 16:37:57 +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
1f9145c5c3
More minor tweaks.
2006-07-12 21:31:16 +00:00
"Robert P. J. Day"
801ab14013
Add one-line GPL boilerplate to numerous (but not all yet) source files.
2006-07-12 07:56:04 +00:00
Mike Frysinger
259472e741
remove duplicate CONFIG_TASKSET option
2006-07-03 05:22:36 +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
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
11c7a7bed6
Various cleanups I made while going through Erik Hovland's patch submissions,
...
some of which are even from him. :)
2006-06-25 22:39:24 +00:00
Bernhard Reutner-Fischer
f087798e8b
- convert old-style parameter declarations (K&R) to modern style.
2006-06-25 22:08:53 +00:00
Rob Landley
399d45f1c6
Aurelien Jacobs pointed out inline functions that could be removed. Doing so
...
shrank the code a bit.
2006-06-21 01:49:17 +00:00
Rob Landley
22d26fc6ae
Patch from Yann Morin to put BLKGETSIZE64 in platform.h had rather a lot of
...
fallout due to the #include <sys/mount.h>. Removed that #include from various
applets and fixed up those that were unhappy when that #include was made
because they'd block copied stuff out of it. (Sigh.)
2006-06-15 15:49:36 +00:00
Rob Landley
176f2df69b
Patch from Erik Hovland, via Tito.
2006-06-08 14:19:48 +00:00
Rob Landley
9c6f9552ec
Some day, maybe gcc will be able to optimize out static functions that are
...
never used so we don't have to #ifdef them. Wouldn't that be nice?
2006-06-08 14:11:36 +00:00
Mike Frysinger
9be7435203
initial support for no-mmu systems
2006-06-07 21:48:43 +00:00
Mike Frysinger
2fc534f3f1
hint at where the Magic comes from
2006-06-07 21:37:49 +00:00
Bernhard Reutner-Fischer
f915a77386
- do away with the comment that noted that the current implementation
...
unly supports linux.
2006-06-07 21:26:09 +00:00
Rob Landley
6d8ce170b0
Fix from Tito to read from stdin only when it's not a tty.
2006-06-07 21:22:42 +00:00
Rob Landley
4c5ad2fc90
Consolidate devfs garbage and mark it as obsolete.
2006-06-07 20:11:53 +00:00
Bernhard Reutner-Fischer
16d3e4e0af
- add applet taskset to set/retrieve the CPU affinity of a process
...
text data bss dec hex filename
584 0 0 584 248 taskset.o.gcc-2.95
509 0 0 509 1fd taskset.o.gcc-3.3
505 0 0 505 1f9 taskset.o.gcc-3.4
506 0 0 506 1fa taskset.o.gcc-4.0
498 0 0 498 1f2 taskset.o.gcc-4.1
495 0 0 495 1ef taskset.o.gcc-4.2-HEAD
2006-06-07 15:44:59 +00:00
Mike Frysinger
ea93f8a397
Tito writes: this patch fixes two potential bugs with the -i -I flags that could be reset during option parsing
2006-06-07 14:25:22 +00:00
Rob Landley
0753f4a15e
Callers to identify() converted the endianness of the buffer. So did
...
identify(). This meant big endian systems had a NUXI problem. Removed
the redundant conversion from the callers, and made some in-passing cleanups
while I was there.
2006-06-07 00:27:25 +00:00
Mike Frysinger
8e640a1043
use vfork() instead of vork() since the only thing we do is execve() an app after fork (allows time to work on no-mmu)
2006-06-06 06:08:34 +00:00
Bernhard Reutner-Fischer
5084c78cbe
- remove superfluous call of stack_machine(0) upon exit.
2006-06-03 21:19:09 +00:00
Bernhard Reutner-Fischer
5f6d67b7d6
- no need to have timer_duration in the data section.
...
- cleanup a little bit while at it.
2006-06-03 20:53:18 +00:00
Bernhard Reutner-Fischer
b1312c9125
- use bb_msg_write_error in 3 places
...
- whitespace
2006-06-03 20:09:02 +00:00
Bernhard Reutner-Fischer
c89982dcd7
- move #include busybox.h to the very top so we pull in the config
...
and eventual platform specific includes in early.
2006-06-03 19:49:21 +00:00
Rob Landley
0620841758
Patch from Tito to remove long options from hdparm.
2006-05-31 22:52:57 +00:00
Bernhard Reutner-Fischer
c418d482ba
- s/defined(__uClinux__)/BB_NOMMU/
...
This needs a second pass to:
+ add bb_daemon(unsigned char no_chdir, unsigned char no_close, const char*flag)
+ eventually globally export argc and argv, so we don't need to pass it to
bb_daemon().
2006-05-31 10:19:51 +00:00
Rob Landley
a6e131dab3
Size reductions, mostly switching things to use libbb functions.
2006-05-29 06:43:55 +00:00
Rob Landley
bba7f08d27
Add SWAP_LE?? and SWAP_BE?? macros, and make things use them. Converts values
...
to/from little endian or big endian, which is a NOP if that's what the current
platform already is.
2006-05-29 05:51:12 +00:00
Rob Landley
81dab2cf83
Fix hdparm to use PRIu64 instead of typecasting to long long (which is 128 bits
...
on 64 bit platforms), and move #include <inttypes.h> to libbb.h.
2006-05-28 01:56:08 +00:00
Rob Landley
8fba99f35e
Move portability stuff to platform.h, and clean up adjtimex.c a bit while
...
I'm in the area.
2006-05-27 22:08:01 +00:00
Rob Landley
299a6b4d7b
Consolidate #include <sys/time.h> so libbb.h does it.
2006-05-27 21:42:58 +00:00
Bernhard Reutner-Fischer
95a040fac8
- use the defines CURRENT_TTY and VC_1; also shrink xargs a tiny bit:
...
add/remove: 0/0 grow/shrink: 2/6 up/down: 5/-37 (-32)
function old new delta
static.add_interface 271 274 +3
static.glob3 36 38 +2
static.renice_main 409 408 -1
static.readcmd 1083 1081 -2
static.changepath 176 174 -2
static.parse_opts 56 51 -5
static.rx_main 1095 1088 -7
static.xargs_main 759 739 -20
----------------------------------------------------------------
Result :-) -32
2006-05-27 09:36:43 +00:00
Bernhard Reutner-Fischer
b21d23bd46
- provide fallback defines for non-linux
2006-05-26 20:33:12 +00:00
Bernhard Reutner-Fischer
01d23ade57
- add central knob to turn off getopt_long everywhere. EXPERIMENTAL!
...
Adds "Enable getopt long" under "General options", default y.
Send patches to fix getopt_ulflags and run_parts.c if you turn this off..
See http://busybox.net/lists/busybox/2006-May/021828.html for a start to run-parts
2006-05-26 20:19:22 +00:00
Bernhard Reutner-Fischer
781e42d66c
- introduce and use bb_path_wtmp_file for portability (saves 11 Bytes).
...
- fix last.c to also look at the double-underscore UT_ defines.
2006-05-26 14:41:40 +00:00
Mike Frysinger
314c739b07
Yann E. MORIN. writes:
...
hdparm has a uint64_t passed to printf with a %llu format (which is ok, because
it's the same size), but without first being casted(?) to unsigned long long int.
Which is kinda funny because it's done OK on a few lines above...
2006-05-26 02:05:19 +00:00
Rob Landley
69d863b6c6
And fix the error I just introduced. :)
2006-05-25 21:13:30 +00:00
Rob Landley
5a2997de72
Remove pointless #define.
2006-05-25 21:12:40 +00:00
Rob Landley
ade7f95bd1
Patch from Tito:
...
Remove -v verbose -V version -q quiet flags
Remove parse_opt_v2();
Rename parse_opt_v3() to parse_xfermode()
Remove if_strcat()
Rearrange code in dump_identity() to reduce size
Modify some strings so that they could be optimized by the compiler
Minor code clean up
Remove unneeded #define <shm.h>
#if BB_BIG_ENDIAN && !defined(__USE_XOPEN)
# define __USE_XOPEN
#endif
Must be before #include <unistd.h> and #include "busybox.h"
(noticed by Bernhard Fischer <rep.nop@aon.at>)
Remove duplicate code in do_time()
2006-05-25 18:53:06 +00:00
Rob Landley
c020f5f518
New version of nohup that's much smaller, less paranoid, consistent,
...
vaguely portable, and licensed GPLv2 "or later".
2006-05-21 18:28:13 +00:00
Bernhard Reutner-Fischer
ef21629a6b
- silence warning about no return in function returning non-void
...
- put CONFIG_DEBUG_CROND_OPTION into config
no changes in size when debugging is disabled.
2006-05-20 14:14:05 +00:00
Bernhard Reutner-Fischer
b1629b1b2a
- remove emacs layout block as suggested by Robert P.J. Day
...
- use shorter boilerplate while at it
2006-05-19 19:29:19 +00:00
Rob Landley
4ae2f511cf
Patch from tito to replace shared memory usage with mlock(), slightly tweaked
...
by me.
2006-05-19 17:24:26 +00:00
Bernhard Reutner-Fischer
a85a63f6ee
- fix invalid mode
2006-05-19 12:22:11 +00:00