platform/upstream/toybox.git
17 years agoConvert HOST_CC to HOSTCC to be more like uClibc build.
Rob Landley [Tue, 13 Mar 2007 01:17:01 +0000 (21:17 -0400)]
Convert HOST_CC to HOSTCC to be more like uClibc build.

17 years agoChange help text: not just used for the kernel.
Rob Landley [Tue, 13 Mar 2007 01:10:06 +0000 (21:10 -0400)]
Change help text: not just used for the kernel.

17 years agoAdd web page background image and check in some half-finished ext2
Rob Landley [Mon, 12 Mar 2007 15:02:04 +0000 (11:02 -0400)]
Add web page background image and check in some half-finished ext2
documentation.

17 years agoFix oneit: <1 is only parsed at the start of the argument list.
Rob Landley [Wed, 21 Feb 2007 20:19:32 +0000 (15:19 -0500)]
Fix oneit: <1 is only parsed at the start of the argument list.

17 years agoCalculate block and inode usage in group table and bitmaps.
Rob Landley [Mon, 19 Feb 2007 06:44:28 +0000 (01:44 -0500)]
Calculate block and inode usage in group table and bitmaps.

17 years agoPrecalculate block and inode usage given a starting file tree. This compiles,
Rob Landley [Sun, 18 Feb 2007 21:24:55 +0000 (16:24 -0500)]
Precalculate block and inode usage given a starting file tree.  This compiles,
probably doesn't actually work yet.

17 years agoAn old test suite wrapper I wrote, cleaned up a bit and checked for copyrights.
Rob Landley [Sun, 18 Feb 2007 19:23:10 +0000 (14:23 -0500)]
An old test suite wrapper I wrote, cleaned up a bit and checked for copyrights.

17 years agoAdd atolx() which understands extensions for kilobytes and megabytes and such.
Rob Landley [Sat, 17 Feb 2007 02:08:22 +0000 (21:08 -0500)]
Add atolx() which understands extensions for kilobytes and megabytes and such.

17 years agoCalculate st_nlink for each node, via a small but n^2 algorithm.
Rob Landley [Wed, 14 Feb 2007 07:20:37 +0000 (02:20 -0500)]
Calculate st_nlink for each node, via a small but n^2 algorithm.

17 years agoMacOS X has a defective sed with no -r.
Rob Landley [Tue, 13 Feb 2007 21:41:51 +0000 (16:41 -0500)]
MacOS X has a defective sed with no -r.

17 years agoMore work on mke2fs.c. Random in-progress snapshot...
Rob Landley [Tue, 13 Feb 2007 01:03:01 +0000 (20:03 -0500)]
More work on mke2fs.c.  Random in-progress snapshot...

17 years agoMake kconfig build on MacOS X. (Because it's there.)
Rob Landley [Tue, 13 Feb 2007 00:59:12 +0000 (19:59 -0500)]
Make kconfig build on MacOS X.  (Because it's there.)

17 years agoAdd parent pointer to dirtree, more work on mke2fs (populate dirtree, count
Rob Landley [Mon, 5 Feb 2007 00:14:58 +0000 (19:14 -0500)]
Add parent pointer to dirtree, more work on mke2fs (populate dirtree, count
index blocks).

17 years agoRename functions.c to lib.c. (Easier name to remember.)
Rob Landley [Mon, 5 Feb 2007 00:06:07 +0000 (19:06 -0500)]
Rename functions.c to lib.c.  (Easier name to remember.)

17 years agoAdd xstat(), read_dirtree(), and read_dirtree_node().
Rob Landley [Sat, 3 Feb 2007 19:11:26 +0000 (14:11 -0500)]
Add xstat(), read_dirtree(), and read_dirtree_node().

17 years agoTeach build to build only the toys/*.c selected in .config, and teach
Rob Landley [Sat, 3 Feb 2007 19:10:00 +0000 (14:10 -0500)]
Teach build to build only the toys/*.c selected in .config, and teach
CFG_TOYSH_DEBUG to shut up the spurious "gcc can't tell that this is never
actually used uninitialized because gcc is stupid" warnings.

17 years agoTrim a redundant definition that confuses older compilers. (Regression testing
Rob Landley [Fri, 2 Feb 2007 15:53:55 +0000 (10:53 -0500)]
Trim a redundant definition that confuses older compilers.  (Regression testing
against Red Hat 9.)

17 years agoToybox option parsing must stop at the first non-option argument.
Rob Landley [Thu, 1 Feb 2007 22:39:14 +0000 (17:39 -0500)]
Toybox option parsing must stop at the first non-option argument.

17 years agoMissing comma, and slight simplification in defconfig sed invocation.
Rob Landley [Wed, 31 Jan 2007 20:23:21 +0000 (15:23 -0500)]
Missing comma, and slight simplification in defconfig sed invocation.

17 years agoAdd "make defconfig". Modify global options to start with CONFIG_TOYBOX_.
Rob Landley [Wed, 31 Jan 2007 19:37:01 +0000 (14:37 -0500)]
Add "make defconfig".  Modify global options to start with CONFIG_TOYBOX_.

17 years agoAdd make install_flat.
Rob Landley [Wed, 31 Jan 2007 19:18:05 +0000 (14:18 -0500)]
Add make install_flat.

17 years agoSmall cleanup to prepare for cross-compile friendly make install.
Rob Landley [Wed, 31 Jan 2007 18:31:19 +0000 (13:31 -0500)]
Small cleanup to prepare for cross-compile friendly make install.

17 years agoAdded tag 0.0.2 for changeset d2e38cb0b1cd
Rob Landley [Wed, 31 Jan 2007 17:28:50 +0000 (12:28 -0500)]
Added tag 0.0.2 for changeset d2e38cb0b1cd

17 years agoI forgot to add count.c a while ago. (Memo to self: grab snapshots and build 0.0.2
Rob Landley [Wed, 31 Jan 2007 17:27:10 +0000 (12:27 -0500)]
I forgot to add count.c a while ago.  (Memo to self: grab snapshots and build
out of directory more often, to make sure I've checked in all the files...)

17 years agoMove download->downloads (be consistent) and add a skeletal index bar along
Rob Landley [Wed, 31 Jan 2007 16:57:08 +0000 (11:57 -0500)]
Move download->downloads (be consistent) and add a skeletal index bar along
the left (copied from firmware linux, half the tabs go nowhere).

17 years agoThis creates an almost valid empty ext2 filesystem, except for a few superblock
Rob Landley [Wed, 31 Jan 2007 15:50:56 +0000 (10:50 -0500)]
This creates an almost valid empty ext2 filesystem, except for a few superblock
fields (blank free_blocks and free_inodes), and no root directory.  (And
technically, no lost+found either.)

17 years agomke2fs: Stopping for dinner. It compiles.
Rob Landley [Mon, 29 Jan 2007 22:44:28 +0000 (17:44 -0500)]
mke2fs: Stopping for dinner.  It compiles.

17 years agoMore work on mke2fs.
Rob Landley [Sun, 28 Jan 2007 09:54:01 +0000 (04:54 -0500)]
More work on mke2fs.

17 years agoMove superblock initialization to a function. Trim unused padding from
Rob Landley [Sun, 28 Jan 2007 01:43:26 +0000 (20:43 -0500)]
Move superblock initialization to a function.  Trim unused padding from
superblock.

17 years agoOne more field, minor shrinking, and start on block groups.
Rob Landley [Sat, 27 Jan 2007 20:10:48 +0000 (15:10 -0500)]
One more field, minor shrinking, and start on block groups.

17 years agoFilling out most of the ext2 superblock correctly now.
Rob Landley [Fri, 26 Jan 2007 15:48:35 +0000 (10:48 -0500)]
Filling out most of the ext2 superblock correctly now.

17 years agoUpdate args.c to implement numeric arguments.
Rob Landley [Thu, 25 Jan 2007 21:11:23 +0000 (16:11 -0500)]
Update args.c to implement numeric arguments.

17 years agoThe fdlength() ioctl apparently doesn't work on files (and the lseek trick
Rob Landley [Thu, 25 Jan 2007 21:10:37 +0000 (16:10 -0500)]
The fdlength() ioctl apparently doesn't work on files (and the lseek trick
doesn't work on some devices, and we can't always tell _when_ it failed), so
go to the binary search for now.

17 years agoMore work on mke2fs.
Rob Landley [Wed, 24 Jan 2007 00:54:01 +0000 (19:54 -0500)]
More work on mke2fs.

17 years agoMore random progress on mke2fs. Nothing to see yet.
Rob Landley [Tue, 23 Jan 2007 18:20:38 +0000 (13:20 -0500)]
More random progress on mke2fs.  Nothing to see yet.

17 years agoAdd "yes" command.
Rob Landley [Sun, 21 Jan 2007 04:41:49 +0000 (23:41 -0500)]
Add "yes" command.

17 years agoTeach pwd to detect write errors.
Rob Landley [Sun, 21 Jan 2007 03:59:00 +0000 (22:59 -0500)]
Teach pwd to detect write errors.

17 years agoComment and whitespace cleanups
Rob Landley [Sun, 21 Jan 2007 03:41:29 +0000 (22:41 -0500)]
Comment and whitespace cleanups

17 years agoHelps to "hg add" echo.c. Also, implement \0123 escapes for -e.
Rob Landley [Sun, 21 Jan 2007 02:32:47 +0000 (21:32 -0500)]
Helps to "hg add" echo.c.  Also, implement \0123 escapes for -e.

17 years agoAdd "echo". Has -n and -e (but not \0123 yet).
Rob Landley [Sat, 20 Jan 2007 23:04:20 +0000 (18:04 -0500)]
Add "echo".  Has -n and -e (but not \0123 yet).

17 years agoMerge a memset with an existing loop, tweak comments.
Rob Landley [Sat, 20 Jan 2007 17:30:19 +0000 (12:30 -0500)]
Merge a memset with an existing loop, tweak comments.

17 years agoMerge two similar loops and expand a comment.
Rob Landley [Fri, 19 Jan 2007 21:31:11 +0000 (16:31 -0500)]
Merge two similar loops and expand a comment.

17 years agoAnother suggestion from Manuel: Grab 2 bits instead of 1 inside a loop. Saves
Rob Landley [Fri, 19 Jan 2007 21:01:54 +0000 (16:01 -0500)]
Another suggestion from Manuel: Grab 2 bits instead of 1 inside a loop.  Saves
4 bytes and reduces running time by one half of one percent.

17 years agoAdd count command.
Rob Landley [Fri, 19 Jan 2007 03:01:04 +0000 (22:01 -0500)]
Add count command.

17 years agoSave 4 bytes of stack space.
Rob Landley [Fri, 19 Jan 2007 03:00:46 +0000 (22:00 -0500)]
Save 4 bytes of stack space.

17 years agoIn bunzip replace setjmp/longjmp handling with error_exit(), replace string
Rob Landley [Fri, 19 Jan 2007 03:00:12 +0000 (22:00 -0500)]
In bunzip replace setjmp/longjmp handling with error_exit(), replace string
based handling of a 6-byte header with with two 24-bit integer reads.  Use
xmalloc() and xzalloc().

17 years agoAdd fdprintf(). Remove reread() and rewrite() which handle -EINTR, which
Rob Landley [Fri, 19 Jan 2007 02:54:08 +0000 (21:54 -0500)]
Add fdprintf().  Remove reread() and rewrite() which handle -EINTR, which
shouldn't be a problem if we register signal handlers with sigaction(SA_RESTART)
Straighten out count and len (I generally consistently use "count" for the
current progress and "len" for the total, but this time I got them backwards
for some reason and don't want to confuse myself in future.)

17 years agoMore optimizations originally suggested by Manuel Nova: Use a sentinel value
Rob Landley [Thu, 18 Jan 2007 23:16:11 +0000 (18:16 -0500)]
More optimizations originally suggested by Manuel Nova: Use a sentinel value
for limit[] to move a test out of a loop.  Unroll a single-bit get_bits()
to avoid a function call in the common case on a hot path.  And one more
application of the old "two tests in one via typecasting and/or math" trick.

17 years agoMinor cleanups.
Rob Landley [Wed, 17 Jan 2007 23:24:17 +0000 (18:24 -0500)]
Minor cleanups.

17 years agoTurn a memmove into a while(), reducing running time by 3.5% in my tests.
Rob Landley [Wed, 17 Jan 2007 23:18:50 +0000 (18:18 -0500)]
Turn a memmove into a while(), reducing running time by 3.5% in my tests.

17 years agoAnother application of Manuel Nova's "math instead of ifs" trick. Saves 17b.
Rob Landley [Wed, 17 Jan 2007 21:58:51 +0000 (16:58 -0500)]
Another application of Manuel Nova's "math instead of ifs" trick.  Saves 17b.

17 years agoMinor optimization the compiler already does for us (according to bloatcheck),
Rob Landley [Wed, 17 Jan 2007 21:56:28 +0000 (16:56 -0500)]
Minor optimization the compiler already does for us (according to bloatcheck),
but it looks cleaner.

17 years agoFix off by one error in a test.
Rob Landley [Wed, 17 Jan 2007 21:31:23 +0000 (16:31 -0500)]
Fix off by one error in a test.

17 years agoComment and whitespace changes.
Rob Landley [Wed, 17 Jan 2007 18:58:08 +0000 (13:58 -0500)]
Comment and whitespace changes.

17 years agoMemmove is 11 bytes shorter than the unrolled loop, and Manuel Nova pointed
Rob Landley [Tue, 16 Jan 2007 19:25:12 +0000 (14:25 -0500)]
Memmove is 11 bytes shorter than the unrolled loop, and Manuel Nova pointed
out how to turn an if/else into a multiply and subtract (saving 2 bytes).

17 years agoAdd a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley [Tue, 16 Jan 2007 18:26:02 +0000 (13:26 -0500)]
Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
out the bunzip2 library.

17 years agoAdd start of mke2fs/gene2fs, and some other stuff I've been working on.
Rob Landley [Mon, 15 Jan 2007 01:20:06 +0000 (20:20 -0500)]
Add start of mke2fs/gene2fs, and some other stuff I've been working on.

17 years agoxread() and xwrite() should take void *, not char *.
Rob Landley [Mon, 8 Jan 2007 09:26:01 +0000 (04:26 -0500)]
xread() and xwrite() should take void *, not char *.

17 years agoAdd xaccess()
Rob Landley [Mon, 8 Jan 2007 08:25:47 +0000 (03:25 -0500)]
Add xaccess()

17 years agoAdd rewrite(), writeall(),and xwrite() to match the read versions.
Rob Landley [Mon, 8 Jan 2007 07:49:39 +0000 (02:49 -0500)]
Add rewrite(), writeall(),and xwrite() to match the read versions.

17 years agoxopen() wants 2 arguments unless you're creating a file, in which case you
Rob Landley [Mon, 8 Jan 2007 03:51:12 +0000 (22:51 -0500)]
xopen() wants 2 arguments unless you're creating a file, in which case you
need 3.  Doing varargs for this doesn't really appeal to me (bugs in waiting)
so I made an xcreate() that takes 3 args, and had xopen() call it with 0 for
the third argument.  That way, if we feed O_CREAT to xopen() the permission
000 result should be easy to spot.

17 years agoTwo unrelated additions I'm working on cross over in this file. In theory I
Rob Landley [Sun, 7 Jan 2007 08:48:26 +0000 (03:48 -0500)]
Two unrelated additions I'm working on cross over in this file.  In theory I
can use mercurial branches to keep this sort of thing separate, but at
the moment I'm just going to check in some dangling config entries that
don't control anything yet.

17 years agoBlah. The sed filter's not right, I'll try again later.
Rob Landley [Thu, 4 Jan 2007 22:26:30 +0000 (17:26 -0500)]
Blah.  The sed filter's not right, I'll try again later.

17 years agoRemove more warnings.
Rob Landley [Mon, 1 Jan 2007 00:10:24 +0000 (19:10 -0500)]
Remove more warnings.

17 years agoMake some of gcc 4.1's dumber warnings go away.
Rob Landley [Mon, 1 Jan 2007 00:09:42 +0000 (19:09 -0500)]
Make some of gcc 4.1's dumber warnings go away.

17 years agoComment tweak.
Rob Landley [Sun, 31 Dec 2006 03:01:47 +0000 (22:01 -0500)]
Comment tweak.

17 years agoNote the mailing list.
Rob Landley [Thu, 14 Dec 2006 20:19:34 +0000 (15:19 -0500)]
Note the mailing list.

17 years agoTeach clean and distclean to zap more files.
Rob Landley [Sun, 26 Nov 2006 23:54:03 +0000 (18:54 -0500)]
Teach clean and distclean to zap more files.

17 years agoAdd bloat-o-meter, make bloatcheck, and scripts/showasm.
Rob Landley [Sun, 26 Nov 2006 23:47:14 +0000 (18:47 -0500)]
Add bloat-o-meter, make bloatcheck, and scripts/showasm.

17 years agoTrawling through the archives: a broken test, an unnecessary memset, and a
Rob Landley [Sun, 26 Nov 2006 23:27:33 +0000 (18:27 -0500)]
Trawling through the archives: a broken test, an unnecessary memset, and a
unrolling a small memmove.

17 years agoMore whitespace/cowbell. (And change comment style to //.)
Rob Landley [Sun, 26 Nov 2006 22:19:18 +0000 (17:19 -0500)]
More whitespace/cowbell.  (And change comment style to //.)

17 years agoReduce flag duplication and make kconfig use HOST_CC.
Rob Landley [Sun, 26 Nov 2006 22:18:29 +0000 (17:18 -0500)]
Reduce flag duplication and make kconfig use HOST_CC.

17 years agoAdd my old micro-bunzip library. Needs some cleanup...
Rob Landley [Sat, 25 Nov 2006 21:50:00 +0000 (16:50 -0500)]
Add my old micro-bunzip library.  Needs some cleanup...

17 years agoLeftover from when I cleaned this up for another project.
Rob Landley [Sat, 25 Nov 2006 21:23:47 +0000 (16:23 -0500)]
Leftover from when I cleaned this up for another project.

17 years agoAdd cat -v.
Rob Landley [Sat, 25 Nov 2006 21:06:55 +0000 (16:06 -0500)]
Add cat -v.

17 years agoAdd oneit.
Rob Landley [Sat, 25 Nov 2006 18:48:02 +0000 (13:48 -0500)]
Add oneit.

17 years agoFix a warning.
Rob Landley [Sat, 25 Nov 2006 18:45:39 +0000 (13:45 -0500)]
Fix a warning.

17 years agoMore work on option parsing. "df -t tmpfs" actually seems to work now.
Rob Landley [Sat, 25 Nov 2006 18:34:51 +0000 (13:34 -0500)]
More work on option parsing.  "df -t tmpfs" actually seems to work now.

17 years agoAdd another warning check and a missing dependency.
Rob Landley [Sat, 25 Nov 2006 18:32:01 +0000 (13:32 -0500)]
Add another warning check and a missing dependency.

17 years agoI got the mercurial web browser thingy set up, note it on the web page.
Rob Landley [Sat, 25 Nov 2006 07:11:10 +0000 (02:11 -0500)]
I got the mercurial web browser thingy set up, note it on the web page.

17 years agoFix a half-dozen bugs in argument parsing. More seems to work than not now.
Rob Landley [Fri, 24 Nov 2006 05:15:21 +0000 (00:15 -0500)]
Fix a half-dozen bugs in argument parsing.  More seems to work than not now.

18 years agoAllocate a more sane amount of memory.
Rob Landley [Mon, 20 Nov 2006 01:35:19 +0000 (20:35 -0500)]
Allocate a more sane amount of memory.

18 years agoFix thinko (inverted test).
Rob Landley [Mon, 20 Nov 2006 01:35:05 +0000 (20:35 -0500)]
Fix thinko (inverted test).

18 years agoAdd one if() that has lots of whitespace fallout.
Rob Landley [Sun, 19 Nov 2006 22:29:35 +0000 (17:29 -0500)]
Add one if() that has lots of whitespace fallout.

18 years agoNew option parsing infrastructure (doesn't use getopt). Hook it up to
Rob Landley [Sun, 19 Nov 2006 07:49:22 +0000 (02:49 -0500)]
New option parsing infrastructure (doesn't use getopt).  Hook it up to
existing applets.  Still a bit buggy, but bits of it work.

18 years agoWeb site updates, and a design document.
Rob Landley [Fri, 10 Nov 2006 00:19:37 +0000 (19:19 -0500)]
Web site updates, and a design document.

18 years agoRedo the index page (flesh it out about halfway), and a couple tweaks to
Rob Landley [Sun, 5 Nov 2006 06:01:34 +0000 (01:01 -0500)]
Redo the index page (flesh it out about halfway), and a couple tweaks to
the license page.

18 years agoThe web page should be in the repository, and while I'm at it let's see if I
Rob Landley [Sun, 5 Nov 2006 04:57:18 +0000 (23:57 -0500)]
The web page should be in the repository, and while I'm at it let's see if I
can commit a file that lives under a symlink.

18 years agoAdd pwd. Consolidate toy list information under toylist.h.
Rob Landley [Sat, 4 Nov 2006 22:45:18 +0000 (17:45 -0500)]
Add pwd.  Consolidate toy list information under toylist.h.

18 years agoImplement which. Add hello world to menuconfig. Wrap the various applet main
Rob Landley [Fri, 3 Nov 2006 05:05:52 +0000 (00:05 -0500)]
Implement which.  Add hello world to menuconfig.  Wrap the various applet main
functions in main.c with USE() macros so --gc-sections can strip them.

18 years agoBetter dependencies, and feed the linker --gc-sections. (Which is not an
Rob Landley [Fri, 3 Nov 2006 00:50:02 +0000 (19:50 -0500)]
Better dependencies, and feed the linker --gc-sections.  (Which is not an
substitute for building just the stuff we need, but is easy to do for now.)

18 years agoAdded tag 0.0.1 for changeset 8f8a8ac59c14
Rob Landley [Thu, 2 Nov 2006 16:59:25 +0000 (11:59 -0500)]
Added tag 0.0.1 for changeset 8f8a8ac59c14

18 years agoThinko: the Config.in for the toys should be in ./toys, not ./lib.
Rob Landley [Thu, 2 Nov 2006 16:20:53 +0000 (11:20 -0500)]
Thinko: the Config.in for the toys should be in ./toys, not ./lib.

18 years agoAdd xabspath(), is_file_type(), which_in_path(), and find_in_path().
Rob Landley [Thu, 2 Nov 2006 07:57:27 +0000 (02:57 -0500)]
Add xabspath(), is_file_type(), which_in_path(), and find_in_path().

18 years agoLinked list functions, forgot to add this to the repository.
Rob Landley [Thu, 2 Nov 2006 03:28:46 +0000 (22:28 -0500)]
Linked list functions, forgot to add this to the repository.

18 years agoMake the config generate gen_config.h with CFG_ and USE() macros.
Rob Landley [Thu, 2 Nov 2006 03:26:25 +0000 (22:26 -0500)]
Make the config generate gen_config.h with CFG_ and USE() macros.
Add distclean.  Make clean have double colons so the kconfig makefile's
clean matches.

18 years agoAdd a hello world applet, partly as an example and partly for testing purposes.
Rob Landley [Thu, 2 Nov 2006 03:23:58 +0000 (22:23 -0500)]
Add a hello world applet, partly as an example and partly for testing purposes.

18 years agoThe darn thing accidentally created a branch. I had to copy a half-dozen
Rob Landley [Thu, 2 Nov 2006 03:19:34 +0000 (22:19 -0500)]
The darn thing accidentally created a branch.  I had  to copy a half-dozen
files to temporary locations to get them out of the way of the merge, and
the next checkin will be putting them _back_.  This commit is entirely to
humor mercurial, and if I could figure out how to avoid getting it in this
weird state, I would.

18 years agoThe Config files don't need the CONFIG_ prefix.
landley [Thu, 2 Nov 2006 02:12:20 +0000 (21:12 -0500)]
The Config files don't need the CONFIG_ prefix.

18 years agoAdd menuconfig, plus some basic Config info, lots of which is just future
landley [Wed, 1 Nov 2006 04:30:06 +0000 (23:30 -0500)]
Add menuconfig, plus some basic Config info, lots of which is just future
plans for toysh.  Nothing's currently _using_ this config info, but at least
it's being generated now.