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
Rob Landley
adde79883f
Largeish cleanup patch from Tito, mostly if statement therapy.
2006-05-16 15:32:30 +00:00
Mike Frysinger
39440e520c
pull Rules.mak from top_srcdir as pointed out by Robert P. J. Day on the mailing list
2006-05-13 02:33:09 +00:00
Mike Frysinger
e92923862e
typecast bbig to kill format warnings
2006-05-11 02:31:45 +00:00
Rob Landley
19802563ed
The if() is cheaper than the extra function parameter. According to make
...
bloatcheck, this saves 112 bytes on x86...
2006-05-08 15:35:46 +00:00
Rob Landley
20deab0537
Cleanup patch from tito.
2006-05-07 23:34:15 +00:00
Rob Landley
39cf645ce0
Patch from Dennis Vlasenko resetting values that get reused.
2006-05-05 16:52:28 +00:00
Rob Landley
2584e9b39f
Remove HDIO_GETGEO_BIG which is dead (removed from 2.6) and was pointless back
...
in 2.4 (it fetched the same hd_geometry struct only with uint cylinders instead
of ushort cylinders: nothing that big has ever accurately reported gemoetry,
it's all LBA.
Also stop declaring the hd_geometry struct static: it's two chars, a short, and
a long for a grand total of 8 bytes. That can go on the stack.
2006-05-03 20:00:00 +00:00
Rob Landley
0f0b645f73
Use ATTRIBUTE_NORETURN as suggested by tito, plus a few in-passing cleanups.
2006-05-03 18:28:06 +00:00
Rob Landley
6389ff1115
Patch from tito removing obsolete code.
2006-05-01 19:28:53 +00:00
Rob Landley
5bc3f05a23
Remove some unused code pointed out by Tito, plus a slightly more graceful
...
way of handling endianness.
2006-04-29 19:11:24 +00:00
Rob Landley
a3e4f38f7b
Style fixes from Denis Vlasenko.
2006-04-29 16:06:31 +00:00
Rob Landley
5f8b5ecda2
Another patch from Denis Vlasenko:
...
Make hdparm smaller:
* Make bb_ioctl return the status
* Replace ioctl with bb_ioctl in a few places
* Add bb_ioctl_alt, use where appropriate (four places)
* unsigned char args1[4+512] = {WIN_IDENTIFY,0,0,1,};
ate 0.5k of rodata, fix that
2006-04-29 16:03:40 +00:00
Rob Landley
e5b281f89e
From Dennis Vlasenko, Make hdparm smaller:
...
* Use combined no_scsi_no_xt()
* Have common unsigned char args[4] = {WIN_SETFEATURES,0,0,0};
2006-04-29 15:49:18 +00:00
Rob Landley
2e2d752d49
Cleanup to hdparm by tito.
2006-04-29 15:23:33 +00:00
Mike Frysinger
59c6baedf7
just include fcntl.h not sys/fcntl.h
2006-04-29 04:43:50 +00:00
Mike Frysinger
f054be12de
Rob Sullivan writes: rewrite the regex handling to improve stability
2006-04-29 04:21:10 +00:00
Rob Landley
0e6a3e14e4
Patch from tito to update output of hdparm.
2006-04-28 01:33:30 +00:00
Bernhard Reutner-Fischer
56fbd21fa7
- return ret so we return something meaningful.
2006-04-24 17:41:29 +00:00
Rob Landley
a2e98043d5
From Rob Sullivan: Fix a segfault with searching, plus some cleanups.
2006-04-18 01:53:41 +00:00
Rob Landley
026147a48f
Patch from Tito to fix printing null and make output look like hdparm 6.3.
2006-04-17 22:29:13 +00:00
Mike Frysinger
20c22e0883
just use the stack to kill memleak and return if user didnt give us anything to match
2006-04-16 21:41:00 +00:00
Mike Frysinger
bf2d9905ca
use xmalloc, dont hardcode length of string, and get rid of pointless call to memset
2006-04-16 21:30:47 +00:00
Mike Frysinger
00d10a94f3
uncuddle if statements
2006-04-16 20:54:19 +00:00
Mike Frysinger
f284c767e5
use more boiler plate GPL notices
2006-04-16 20:38:26 +00:00
Mike Frysinger
3a2b103eea
uncuddle brackets
2006-04-16 20:34:26 +00:00
Rob Landley
2ec922eed5
Patch from Robert P Day: let menuconfig indent stuff for us, we don't have
...
to do it in Config.in.
2006-04-13 23:22:16 +00:00
Bernhard Reutner-Fischer
c2cb0f32b4
- patch from Denis Vlasenko to add and use bb_xopen3()
2006-04-13 12:45:04 +00:00
Bernhard Reutner-Fischer
d9cf7ac781
- patch from Denis Vlasenko to add and use bb_xchdir()
2006-04-12 18:39:58 +00:00
Bernhard Reutner-Fischer
2c99851181
- patch from Denis Vlasenko to add and use bb_xdaemon()
2006-04-12 18:09:26 +00:00
Bernhard Reutner-Fischer
9460f66e4e
- tweak visibility of label expected_hwif_error as it's only needed for
...
CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF or CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF
2006-04-11 08:01:29 +00:00
Bernhard Reutner-Fischer
061fd0a353
- make sure that the label expected_hwif_error is visible even when
...
CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF isn't set.
2006-04-05 16:37:25 +00:00
Rob Landley
a8e2760924
Clarify.
2006-03-30 02:01:48 +00:00
Paul Fox
5139bd98a7
add public-domain release
2006-03-29 19:54:02 +00:00
Bernhard Reutner-Fischer
771b186406
- commentary typos
2006-03-24 14:30:05 +00:00
Mike Frysinger
e1d41b3102
fixup style
2006-03-23 02:07:41 +00:00
Mike Frysinger
948a09d6f2
dont printf arguments given by user for security sanity
2006-03-23 02:07:20 +00:00
Bernhard Reutner-Fischer
df10094870
- revert back to r14406
2006-03-13 19:04:00 +00:00
Rob Landley
c5b1d4d6b1
Patch from Denis Vlasenko to add xstat() and use it.
2006-03-13 15:45:16 +00:00
Bernhard Reutner-Fischer
07a79e75f5
- backout using features which are not available with the previous stable
...
version of make (3.71.1).
2006-03-09 09:03:37 +00:00
Rob Landley
dfba741457
Robert P. Day removed 8 gazillion occurrences of "extern" on function
...
definitions. (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Rob Landley
688ed0d760
Patch from Robert P. Day, moving byte order checks to use platform.h macros.
2006-03-04 22:40:25 +00:00
Bernhard Reutner-Fischer
e3ec99de82
- remove unused lists *-m
2006-03-02 18:23:13 +00:00
Bernhard Reutner-Fischer
022eb311d5
- use absolute path for top_builddir and top_srcdir.
...
Fixes make trying to include the very same file in an endless loop.
2006-03-02 17:33:25 +00:00
Bernhard Reutner-Fischer
5d26126b9e
- fixes parallel builds (make -j)
...
- use less resources for the buildsystem itself
2006-03-01 22:54:48 +00:00
"Vladimir N. Oleynik"
73804d6f7e
more security: don't start shell code from argv
2006-02-28 08:23:27 +00:00
Rob Landley
2fe4eac4ea
Cosmetic cleanup from tito.
2006-02-28 04:45:24 +00:00
Bernhard Reutner-Fischer
0817313255
- whitespace cleanup from Tito.
2006-02-27 22:34:41 +00:00
Rob Landley
51be57e4df
Convert all the applets from #include to USE(). Had to fix some nonstandard
...
naming along the way to get USE() macros for everything.
2006-02-23 00:42:25 +00:00
Rob Landley
0a7c8ef6e2
Patch from Denis Vlasenko to constify things and fix a few typos.
2006-02-22 17:01:00 +00:00
Rob Landley
d6e14d8bee
Don't build directory libraries unless we're building an applet that needs it.
...
Cherry-picked from Devin Bayer's big MacOS X patch.
2006-02-21 19:11:35 +00:00
Mike Frysinger
b38673fb9f
make the build system puuuuuuuuuuurty
2006-02-02 01:41:53 +00:00
"Vladimir N. Oleynik"
73ffd762ca
removed anoinig warnings
2006-02-01 12:56:19 +00:00
"Vladimir N. Oleynik"
dd14ca082a
protect potential overflow for x86_64
2006-01-31 09:35:45 +00:00
Eric Andersen
a68ea1cb93
fix up yet more annoying signed/unsigned and mixed type errors
2006-01-30 22:48:39 +00:00
Eric Andersen
9a58b02ec7
make certain we dereference the pointer as a time_t, esp on x86_64
...
where it might otherwise not be dereferenced as such by default
2006-01-30 22:33:31 +00:00
Bernhard Reutner-Fischer
20f4000086
- add some ATTRIBUTE_UNUSED.
...
- use shorter boilerplate while at it.
2006-01-30 17:17:14 +00:00
"Vladimir N. Oleynik"
cd5c15d287
removed warning "comparison between signed and unsigned". Change very very old code: use int instead short
2006-01-30 13:36:03 +00:00
Tim Riker
c1ef7bdd8d
just whitespace
2006-01-25 00:08:53 +00:00
Bernhard Reutner-Fischer
7ca61b6f33
- shared libbusybox.
...
- IMA compilation option (aka IPO, IPA,..)
Please holler if i broke something..
2006-01-15 14:04:57 +00:00
"Vladimir N. Oleynik"
24f819fd74
can use TMPDIR if user's HOMEDIR do not found. Noticed by Bernhard
2006-01-10 12:35:43 +00:00
Bernhard Reutner-Fischer
17329745fc
- fix check for group and user, remove some whitespace while at it.
2005-12-21 15:07:30 +00:00
Rob Landley
ef1f7b5058
Ahem. Vladimir checked in a different fix bug didn't close out the bug.
...
Reverting...
2005-12-16 08:03:34 +00:00
Rob Landley
4b91b88fcb
Less would segfault if it had no tty. (Bug 600.)
2005-12-16 08:02:11 +00:00
"Vladimir N. Oleynik"
8315cd527f
fopen(TTY...) to bb_xfopen(), close bug 600
2005-12-15 11:53:22 +00:00
"Vladimir N. Oleynik"
2f0a5f947a
restore compare_string_array new interface (make broken by landley)
2005-12-06 12:00:39 +00:00
Bernhard Reutner-Fischer
62d7acc97e
- add BB_APPLET_RUNLEVEL used by emdebian via /etc/init.d/rc.
...
Note that we leave the buggy CONFIG_* namespace now, so please fix any applet you thouch.
2005-10-28 20:37:03 +00:00
Rob Landley
1b751c894b
Rob Sullivan sent in some cleanups, which I beat on slightly.
2005-10-28 09:24:33 +00:00
"Vladimir N. Oleynik"
1f0262bcdb
another more const
2005-10-20 11:17:48 +00:00
"Vladimir N. Oleynik"
b4b6d26287
data --> code
2005-10-15 14:10:36 +00:00
Rob Landley
1ba19d6bf7
Coprolith polishing time: Tito switched devfsd over from CONFIG_ to ENABLE_.
2005-10-08 17:42:35 +00:00
"Vladimir N. Oleynik"
39a841cecf
change interface to bb_xasprintf() - more perfect for me.
...
ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers
reduce 100 bytes don't care in sum
2005-09-29 16:18:57 +00:00
Mike Frysinger
62f18e1f20
use the shorter license header
2005-09-24 07:16:29 +00:00
Mike Frysinger
0d4ee68be5
use brief license line
2005-09-24 06:01:57 +00:00
"Vladimir N. Oleynik"
b8fa7e88f2
quick patch - have removed stranges for me
2005-09-22 14:19:34 +00:00
"Vladimir N. Oleynik"
cef737f038
moved include/bbconfigopts.h from miscutils to to top Makefile before generate .depend. Remove allyesconfig build problem, noticed by Bernhard Fischer
2005-09-21 07:49:34 +00:00
Bernhard Reutner-Fischer
d5bd137a24
- rename libbb's password helpers as suggested in libbb.h
...
my_getpwnam -> bb_xgetpwnam /* dies on error */
my_getgrnam -> bb_xgetgrnam /* dies on error */
my_getgrgid -> bb_getgrgid
my_getpwuid -> bb_getpwuid
my_getug -> bb_getug
2005-09-20 21:06:17 +00:00