This fixes the warning, and makes the binary smaller out of sheer pique.
(Yes, since Manuel did this one it's nice tight code that took several
attempts to shrink, but I was ticked.)
Add the start of a test for uniq; this is about the first 1/3 of the
tests we need for full susv3 coverage of uniq.
the result of the ioctl so callers can tell if we have a tty. (0 means
we have a tty, nonzero means the ioctl couldn't find size info and we
fake 80x24. Really we should fake 80x25, but oh well...)
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.
- *
0000072: Add applet to redirect console output via ioctl(..., TIOCCONS)
applet name changed to setconsole, since suse has a very similar
utility. better to treat differences as bugs than invent a new command.
since simply defining the prototype in an internal header file doesnt hurt anyone, lets not worry about the header file crap and just always prototype the inet6 functions
Rob Landley, and others.
Currently CONFIG options are defined or undefined, so we chop out code with
#ifdefs, ala:
#ifdef CONFIG_THING
stuff();
#endif
This creates a new header file, bb_config.h, which sets the CONFIG entry to 1
or 0, and lets us do:
if(CONFIG_THING) stuff();
And let the compiler do dead code elimination to get rid of it. (Note: #ifdef
will still work because for the 1 case it's a static const int, not a #define.)
with tweaks from Mike Frysinger and Rob Landley.
Note: this will still fail to umount a path that contains an ' or \ character.
Is it worth the extra size to filter for that?
To: busybox@mail.codepoet.org
Wrap sockaddr_in6 in a ifdef CONFIG_FEATURE_IPV6.
Include sys/types.h instead of asm/types.h.
Include netinet/if_ether.h instead of linux/if_ether.h
The ioctl request argument is an int, not an unsigned short.
> Hi,
> this is a first attempt of size optimization for zcip taking into account all
> the hints given so far on the list.
> I've applied just the more obvious busyboxifications so maybe it could be
> optimized more.
BTW: I've ripped out a lot of debug code and changed c++ // comments to /* */
as both were rather confusing for a newbie like me. ;-)
Sorry to the author for that.
I know that this makes mantaining the code easier, but I'm simple minded....