Commit Graph

72 Commits

Author SHA1 Message Date
Denis Vlasenko
e324184c05 s/#ifdef CONFIG_/#if ENABLE_/g 2007-08-13 10:36:25 +00:00
Denis Vlasenko
6ca409e0e4 trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount
  of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts

size saving: 0.5k
2007-08-12 20:58:27 +00:00
Denis Vlasenko
9a7d38fe24 delete tons of extra #includes 2007-05-31 22:42:12 +00:00
Denis Vlasenko
b6adbf1be2 usage.c: remove reference to busybox.h
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
06af216528 suppress warnings about easch <applet>_main() having
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
98ee06d3d4 stop using __u32 etc. uint32_t is there for a reason 2006-12-31 18:57:37 +00:00
Denis Vlasenko
dca0b707c0 reshuffle libbb.h contents so that order of decls makes sense
Found bad typo in largefile support :)
2006-10-27 09:05:02 +00:00
Denis Vlasenko
f0ed376eda remove bb_printf and the like 2006-10-26 23:21:47 +00:00
Denis Vlasenko
67b23e6043 getopt_ulflags -> getopt32.
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
2006-10-03 21:00:06 +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
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
98ea849623 Patch from Dirk Clemens so df doesn't run numbers together on drives >100gig. 2005-09-10 02:59:35 +00:00
"Vladimir N. Oleynik"
27421a1878 1) bb_opt_complementaly -> bb_opt_complementally
2) better support long options
3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
2005-09-05 14:46:07 +00:00
Rob Landley
6a6798b8e4 Major rewrite of mount, umount, losetup. Untangled lots of code, shrunk
things down a bit, fixed a number of funky corner cases, added support for
several new features (things like mount --move, mount --bind, lazy unounts,
automatic detection of loop mounts, and so on).  Probably broke several
other things, but it's fixable.  (Bang on it, tell me what doesn't work for
you...)

Note: you no longer need to say "-o loop".  It does that for you when
necessary.

Still need to add "user mount" support, which involves making mount suid.  Not
too hard to do under the new infrastructure, just haven't done it yet...

The previous code had the following notes, that belong in the version
control comments:

- * 3/21/1999   Charles P. Wright <cpwright@cpwright.com>
- *             searches through fstab when -a is passed
- *             will try mounting stuff with all fses when passed -t auto
- *
- * 1999-04-17  Dave Cinege...Rewrote -t auto. Fixed ro mtab.
- *
- * 1999-10-07  Erik Andersen <andersen@codepoet.org>.
- *              Rewrite of a lot of code. Removed mtab usage (I plan on
- *              putting it back as a compile-time option some time),
- *              major adjustments to option parsing, and some serious
- *              dieting all around.
- *
- * 1999-11-06  mtab support is back - andersee
- *
- * 2000-01-12   Ben Collins <bcollins@debian.org>, Borrowed utils-linux's
- *              mount to add loop support.
- *
- * 2000-04-30  Dave Cinege <dcinege@psychosis.com>
- *             Rewrote fstab while loop and lower mount section. Can now do
- *             single mounts from fstab. Can override fstab options for single
- *             mount. Common mount_one call for single mounts and 'all'. Fixed
- *             mtab updating and stale entries. Removed 'remount' default.
- *
2005-08-10 20:35:54 +00:00
Eric Andersen
93d7fba892 Tito, farmatito at tiscali dot it writes:
Hi to all,
This patch is useful for:
1) remove an unused var from extern char *find_real_root_device_name(const char* name)
    changing it to extern char *find_real_root_device_name(void).
2) fixes include/libbb.h, coreutils/df.c, util-linux/mount.c and  util-linux/umount.c accordingly.
3) fixes a bug, really a false positive,  in find_real_root_device_name() that happens if
    in the /dev directory exists a link named root (/dev/root) that should be skipped but
    is not. This affects applets like df that display wrong results
2004-08-03 00:14:02 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.

Erik - please apply.

Authors - please check that I didn't corrupt any meaning.

Package importers - see if any of these changes should be
passed to the upstream authors.

I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.

What is "pretect redefined for test" in cmdedit.c?

Good luck on the 1.00 release!

      - Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Eric Andersen
cb81e6484d Update a bunch of docs. Run a script to update my email addr. 2003-07-14 21:21:08 +00:00
Eric Andersen
9d7f0f0fe8 Somewhere in the 2.4.x kernel series, /proc/mounts was changed to display a
"rootfs" entry as well as the traditional "/dev/root" entry.  This caused
applets such as mount and df to display two root filesystem entries....

This teaches the relevant utilities to ignore the "rootfs" entry.
 -Erik
2003-06-20 09:36:49 +00:00
Eric Andersen
8876fb2f59 last_patch89 from vodz:
Manuel,

    I rewrite bb_getopt_ulflags() function for more universal usage.
    My version support now:
    - options with arguments (optional arg as GNU extension also)
    - complementaly and/or incomplementaly and/or incongruously and/or list
    options
    - long_opt (all applets may have long option, add supporting is trivial)
    This realisation full compatibile from your version.
    Code size grow 480 bytes, but only coreutils/* over compensate this size
    after using new function. Last patch reduced over 800 bytes and not full
    applied to all. "mkdir" and "mv" applets have long_opt now for demonstrate
    trivial addition support long_opt with usage new bb_getopt_ulflags().
    Complementaly and/or incomplementaly and/or incongruously and/or list options
    logic is not trivial, but new "cut" and "grep" applets using this logic
    for examples with full demostrating. New "grep" applet reduced over 300
    bytes.

    Mark,
    Also. I removed bug from "grep" applet.
    $ echo a b | busybox grep -e a b
    a b
    a b
    But right is printing one only.

    --w
    vodz
2003-06-20 09:01:58 +00:00
Manuel Novoa III
3a9b0bf0ba Oops... had != but meant ==. 2003-03-23 20:27:33 +00:00
Manuel Novoa III
4eff18189a Things my compiler didn't catch... 2003-03-19 09:42:02 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Eric Andersen
bdfd0d78bc Major rework of the directory structure and the entire build system.
-Erik
2001-10-24 05:00:29 +00:00
Manuel Novoa III
8f01839386 Fixed scaling problems involving make_human_readable_str. 2001-06-30 07:48:01 +00:00
Eric Andersen
f429baca86 I reworked make_human_readable_str so it now has a sane interface,
and then fixed up df, du, and ls to use the new interface.  I also
fixed up some formatting issues in ls while I was in there.
 -Erik
2001-06-13 08:02:45 +00:00
Eric Andersen
c911a4389b Patch from Vladimir:
1) fixed a bug that could crash df, mount, and umount applets if the root
    device name was longer then the word "root" (/dev/loop1 vs /dev/root) -
    2) severl functions needed static declaration in the umount applet
    3) update declaration for function in last_char_is() in libbb
2001-05-15 17:42:16 +00:00
Eric Andersen
d92168486b Fixed df.c so that nfs volumes will display properly (fixing bug #1113).
Problem was 512/1024 = 0 if you use longs, so I cast KILOBYTE to a double, then
cast the result back to an int after the math is done, letting C's type
promotion do its magic for the rest.
 -Erik
2001-03-09 22:42:26 +00:00
Eric Andersen
eba8ed71f0 Patchs from Jeff Garzik <jgarzik@mandrakesoft.com> to cleanup
warnings with glibc 2.2 and use always use xfopen
 -Erik
2001-03-09 14:36:42 +00:00
Mark Whitley
ae5612ca6e Some minor cleanups to df.c. Also, with Erik's blessing, changed name of
'format' function to 'make_human_readable_str'.
2001-03-07 17:42:07 +00:00
Eric Andersen
ec9fad9a49 Static-ify a variable. make du work with all the human-readable variants
since my last pass only fixed 'du -h' but left the others broken.
2001-03-07 06:04:08 +00:00
Eric Andersen
5986f8d1c6 Fix up df so it works properly
-Erik
2001-03-07 03:50:03 +00:00
Eric Andersen
54006bce25 Oops! I left in my debug noise. 2001-02-21 00:27:22 +00:00
Eric Andersen
7c3e7ac940 df was totally broken. So I fixed it.
-Erik
2001-02-21 00:24:51 +00:00
Mark Whitley
8d7bdc9deb Small patch from Kent Robotti to show megabytes in human-readable output. 2001-02-20 21:57:55 +00:00
Eric Andersen
9e37007edb Minor cleanup. 2001-02-20 21:52:49 +00:00
Eric Andersen
cbe31dace5 It turns out that DODMALLOC was broken when I reorganized busybox.h
header file usage before the 0.49 release.  To fix it, I had to move
the '#include "busybox.h"' to the end of the list of #include files.
 -Erik
2001-02-20 06:14:08 +00:00
Eric Andersen
b50da53e0c Get rid of long stale usage message code.
-Erik
2001-02-17 16:52:35 +00:00
Eric Andersen
67991cf824 This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make
usage messages occupy less space and simplify how usage messages
are displayed.
2001-02-14 21:23:06 +00:00
Matt Kraai
dd19c69904 Removed trailing \n from error_msg{,_and_die} messages. 2001-01-31 19:00:21 +00:00
Eric Andersen
8ec10a9483 Fix up copyright msgs. Bump version to 0.49 in preparation for
a release.  Update the website with release details.
 -Erik
2001-01-27 09:33:39 +00:00
Eric Andersen
ed3ef50c23 Fix header file usage -- there were many unnecessary header files included in
busybox.h which slowed compiles.  I left only what was needed and then fixed up
all the apps to include their own header files.  I also fixed naming for pwd.h
and grp.h functions.  Tested to compile and run with libc5, glibc, and uClibc.
 -Erik
2001-01-27 08:24:39 +00:00
Eric Andersen
e132119f07 Fix silly typo 2001-01-22 22:50:01 +00:00
Richard June
6d0921cc0b Add HUMAN_READABLE define for -m and -h support in du, df, and ls
Add support for -k in du, df, and ls(no define, it's for compatibliity with the GNU utils as bb does -k by default)
Fix bug #1084
2001-01-22 22:35:38 +00:00
Mark Whitley
f57c944e09 Changed names of functions in utility.c and all affected files, to make
compliant with the style guide. Everybody rebuild your tags file!
2000-12-07 19:56:48 +00:00
Matt Kraai
92ed8a3519 Fix exit status on failure. 2000-12-06 15:55:23 +00:00
Matt Kraai
3e856ce428 Stop using TRUE and FALSE for exit status. 2000-12-01 02:55:13 +00:00
Eric Andersen
3570a34de4 Renamed "internal.h" to the more sensible "busybox.h".
-Erik
2000-09-25 21:45:58 +00:00
Eric Andersen
88f50b6bf5 Some #include updates.
-Erik
2000-08-10 17:59:11 +00:00
Matt Kraai
bf181b9338 Extract usage information into a separate file. 2000-07-16 20:57:15 +00:00