OSDN Git Service

android-x86/external-toybox.git
12 years agoUpdate chmod to work with new dirtree, and fix bugs in string_to_mode().
Rob Landley [Sun, 3 Jun 2012 05:32:12 +0000 (00:32 -0500)]
Update chmod to work with new dirtree, and fix bugs in string_to_mode().

12 years agoChanged my mind about the design again, now callback is dirtree_opennode() and recurs...
Rob Landley [Sat, 2 Jun 2012 01:27:51 +0000 (20:27 -0500)]
Changed my mind about the design again, now callback is dirtree_opennode() and recursion choice is how caller interprets flags.

12 years agoFactor out dirtree_comeagain() callback, setting up depth-first search with open...
Rob Landley [Sat, 2 Jun 2012 01:04:39 +0000 (20:04 -0500)]
Factor out dirtree_comeagain() callback, setting up depth-first search with open filehandle in node->extra.

12 years agoConvert another realpath use to xrealpath().
Rob Landley [Fri, 1 Jun 2012 22:59:11 +0000 (17:59 -0500)]
Convert another realpath use to xrealpath().

12 years agoConvert mktemp to use xrealpath, and general clean up while there.
Rob Landley [Fri, 1 Jun 2012 18:51:22 +0000 (13:51 -0500)]
Convert mktemp to use xrealpath, and general clean up while there.

12 years agoAdd xrealpath() at suggestion of Ashish Briggers.
Rob Landley [Fri, 1 Jun 2012 18:50:41 +0000 (13:50 -0500)]
Add xrealpath() at suggestion of Ashish Briggers.

12 years agoImplement -C and -x for ls.
Rob Landley [Fri, 1 Jun 2012 02:22:10 +0000 (21:22 -0500)]
Implement -C and -x for ls.

12 years agocp doesn't really need the optstring + logic. Still needs to be updated for new...
Rob Landley [Fri, 1 Jun 2012 02:17:11 +0000 (21:17 -0500)]
cp doesn't really need the optstring + logic.  Still needs to be updated for new dirtree, though.

12 years agoUpdate chgrp so -R works, tweaking DIRTREE_COMEAGAIN design along the way.
Rob Landley [Sun, 27 May 2012 05:56:17 +0000 (00:56 -0500)]
Update chgrp so -R works, tweaking DIRTREE_COMEAGAIN design along the way.

12 years agoProbe available libraries to link --as-needed, avoiding "unknown libarary" errors.
Rob Landley [Thu, 24 May 2012 02:54:16 +0000 (21:54 -0500)]
Probe available libraries to link --as-needed, avoiding "unknown libarary" errors.

12 years agodirtree logic cleanup: switch DIRTREE_NORECURSE and DIRTREE_NOSAVE to DIRTREE_RECURSE...
Rob Landley [Sun, 20 May 2012 20:00:19 +0000 (15:00 -0500)]
dirtree logic cleanup: switch DIRTREE_NORECURSE and DIRTREE_NOSAVE to DIRTREE_RECURSE and DIRTREE_SAVE.

12 years agoSilence pointless warnings.
Rob Landley [Sun, 20 May 2012 19:58:39 +0000 (14:58 -0500)]
Silence pointless warnings.

12 years agoFirst pass at a complete rewrite of string_to_mode(). (It compiled!)
Rob Landley [Thu, 17 May 2012 02:11:43 +0000 (21:11 -0500)]
First pass at a complete rewrite of string_to_mode().  (It compiled!)

12 years agoRemove strndupa() gnu-ism at Georgi's suggestion, and adjust mdev to compile with...
Rob Landley [Wed, 9 May 2012 11:39:01 +0000 (06:39 -0500)]
Remove strndupa() gnu-ism at Georgi's suggestion, and adjust mdev to compile with new dirtree. (No idea if it works, this command was never finished and needs a lot more work.)

12 years agoWhitespace (tabs vs spaces) cleanup.
Rob Landley [Wed, 9 May 2012 11:11:23 +0000 (06:11 -0500)]
Whitespace (tabs vs spaces) cleanup.

12 years agoAddition of mktemp
Elie De Brauwer [Tue, 1 May 2012 09:45:45 +0000 (11:45 +0200)]
Addition of mktemp

12 years agoGeorgi pointed out that some overly-pedantic C libraries require you to include both...
Rob Landley [Sat, 28 Apr 2012 06:22:50 +0000 (01:22 -0500)]
Georgi pointed out that some overly-pedantic C libraries require you to include both "string.h" and "strings.h". (Most don't.)

12 years agoSimplify/unify listfiles recursion: populate directory node (and detect top of tree...
Rob Landley [Fri, 27 Apr 2012 00:59:38 +0000 (19:59 -0500)]
Simplify/unify listfiles recursion: populate directory node (and detect top of tree) at start of function rather than end (and redundantly in main). Move title printing down next to total printing.

12 years agoAdding initial version of login.c
Elie De Brauwer [Tue, 24 Apr 2012 21:09:27 +0000 (23:09 +0200)]
Adding initial version of login.c

12 years agoMake -d work in ls.
Rob Landley [Wed, 25 Apr 2012 01:44:09 +0000 (20:44 -0500)]
Make -d work in ls.

12 years agoRequire -R to recurse, but descend into directories listed on command line.
Rob Landley [Tue, 24 Apr 2012 10:48:03 +0000 (05:48 -0500)]
Require -R to recurse, but descend into directories listed on command line.

12 years agoMore work on ls. Now ls -lR sort of works-ish.
Rob Landley [Mon, 23 Apr 2012 04:01:23 +0000 (23:01 -0500)]
More work on ls.  Now ls -lR sort of works-ish.

12 years agoAdding logname
Elie De Brauwer [Sat, 14 Apr 2012 17:55:13 +0000 (19:55 +0200)]
Adding logname

12 years agoRefactor uniq.c a bit.
Rob Landley [Sun, 15 Apr 2012 03:34:34 +0000 (22:34 -0500)]
Refactor uniq.c a bit.

12 years agoTeach make.sh to create flag macros, but with the wrong names. Dunno how to make...
Rob Landley [Sun, 15 Apr 2012 03:31:53 +0000 (22:31 -0500)]
Teach make.sh to create flag macros, but with the wrong names. Dunno how to make a translation macro or #ifdef guard to get the names right so they actually be _used_ yet...

12 years agoRewrite dirtree so we don't need readdir, scandir, and fts.h. Rewrite ls (from scrat...
Rob Landley [Sun, 15 Apr 2012 03:30:41 +0000 (22:30 -0500)]
Rewrite dirtree so we don't need readdir, scandir, and fts.h.  Rewrite ls (from scratch) to use new dirtree infrastructure. (This breaks everything else that currently uses dirtree.)

12 years agoComment and whitespace changes.
Rob Landley [Sun, 15 Apr 2012 02:43:24 +0000 (21:43 -0500)]
Comment and whitespace changes.

12 years agoUse FLAG_ macros for echo optflags.
Rob Landley [Sun, 15 Apr 2012 02:41:19 +0000 (21:41 -0500)]
Use FLAG_ macros for echo optflags.

12 years agoMatch uint64_t with PRIu64 to avoid warnings on 64 bit builds.
Rob Landley [Sun, 15 Apr 2012 02:27:00 +0000 (21:27 -0500)]
Match uint64_t with PRIu64 to avoid warnings on 64 bit builds.

12 years agotoybuf usage enhancement, tabs to spaces, teminal height refresh
Elie De Brauwer [Wed, 11 Apr 2012 17:11:45 +0000 (19:11 +0200)]
toybuf usage enhancement, tabs to spaces, teminal height refresh

12 years agoReplace ?: gcc extension with standard code
Kevin Chase [Sat, 7 Apr 2012 17:15:52 +0000 (10:15 -0700)]
Replace ?: gcc extension with standard code

12 years agoAdding vmstat
Elie De Brauwer [Mon, 9 Apr 2012 11:31:44 +0000 (13:31 +0200)]
Adding vmstat

12 years agoAdding mountpoint
Elie De Brauwer [Mon, 2 Apr 2012 21:30:49 +0000 (23:30 +0200)]
Adding mountpoint

12 years agoImplement comm.
Ilya Kuzmich [Thu, 22 Mar 2012 14:01:34 +0000 (09:01 -0500)]
Implement comm.

12 years agoThe -s flag includes staying quiet about missing files.
Rob Landley [Thu, 22 Mar 2012 14:00:59 +0000 (09:00 -0500)]
The -s flag includes staying quiet about missing files.

12 years agoTest the right variable in NULL guard, and add NOP "s" suffix.
Rob Landley [Wed, 21 Mar 2012 22:49:14 +0000 (17:49 -0500)]
Test the right variable in NULL guard, and add NOP "s" suffix.

12 years agoUsing /dev/tty for yesno() is wrong because yes 'n' | cp -ial needs to work.
Rob Landley [Tue, 20 Mar 2012 16:10:54 +0000 (11:10 -0500)]
Using /dev/tty for yesno() is wrong because yes 'n' | cp -ial needs to work.

12 years agoUnwind gratuitous macros.
Rob Landley [Tue, 20 Mar 2012 01:56:18 +0000 (20:56 -0500)]
Unwind gratuitous macros.

12 years agoHave probe for unshare test for actual unshare() function in libc.
Rob Landley [Tue, 20 Mar 2012 01:15:08 +0000 (20:15 -0500)]
Have probe for unshare test for actual unshare() function in libc.

12 years agoAdd string to mode_t parser
Daniel Walter [Tue, 20 Mar 2012 00:57:56 +0000 (19:57 -0500)]
Add string to mode_t parser

added new function string_to_mode(char *m_string, mode_t base) which
parses a given string and converts it to a mode_t.
If either + or - are part of m_string the permissions are either
added or removed from base.

Currently support for permision copy is missing (e.g. g=u),
but all other flags should work.

Format for m_string: either symbolic modes or octal representation.

symbolic modes:
[auog][[+-=][rwxst]*]

examples:
string_to_mode("u=rwx,g=rw,o=r", 0);
string_to_mode("a-x", 0777);
string_to_mode("0744", 0);

12 years agoRemove "feature test macros", replace non-portable fdprintf() with standard fprintf().
Rob Landley [Tue, 20 Mar 2012 00:19:21 +0000 (19:19 -0500)]
Remove "feature test macros", replace non-portable fdprintf() with standard fprintf().

12 years agoImplement Apple and Android versions of getline(), getdelim(), and clearenv().
Georgi Chorbadzhiyski [Fri, 16 Mar 2012 11:42:08 +0000 (06:42 -0500)]
Implement Apple and Android versions of getline(), getdelim(), and clearenv().

12 years agoThe linux header doesn't prototype unshare, and the glibc header introduced a regress...
Rob Landley [Fri, 16 Mar 2012 11:20:48 +0000 (06:20 -0500)]
The linux header doesn't prototype unshare, and the glibc header introduced a regression in recent versions inexplicably crediting a linux feature to the FSF, so add the prototype ourselves.

12 years agoSimplify nanosleep call.
Rob Landley [Fri, 16 Mar 2012 01:49:11 +0000 (20:49 -0500)]
Simplify nanosleep call.

12 years agoImplement uniq.
Georgi Chorbadzhiyski [Thu, 15 Mar 2012 03:04:06 +0000 (22:04 -0500)]
Implement uniq.

12 years agoDefault new ch* commands to n until enough is implemented not to break aboriginal...
Rob Landley [Thu, 15 Mar 2012 02:02:19 +0000 (21:02 -0500)]
Default new ch* commands to n until enough is implemented not to break aboriginal build.

12 years agoNew toys - chmod, chown, and chgrp.
Georgi Chorbadzhiyski [Wed, 14 Mar 2012 02:05:12 +0000 (21:05 -0500)]
New toys - chmod, chown, and chgrp.

12 years agoExtensive semi-gratuitous refactoring: factor out common code, handle euid!=uid and...
Rob Landley [Tue, 13 Mar 2012 04:00:28 +0000 (23:00 -0500)]
Extensive semi-gratuitous refactoring: factor out common code, handle euid!=uid and egid!=gid cases.  (Note: test suite requires root access, possibly container support.)

12 years agoTighten up the code a bit, and use actual process group id instead of what /etc/passw...
Rob Landley [Tue, 13 Mar 2012 01:56:56 +0000 (20:56 -0500)]
Tighten up the code a bit, and use actual process group id instead of what /etc/passwd says.

12 years agoYet another header for technical susv4 compliance.
Rob Landley [Mon, 12 Mar 2012 05:26:23 +0000 (00:26 -0500)]
Yet another header for technical susv4 compliance.

12 years agoRedo tail to use optargs and optionally support lseek. Add support to optargs and...
Rob Landley [Mon, 12 Mar 2012 05:25:40 +0000 (00:25 -0500)]
Redo tail to use optargs and optionally support lseek. Add support to optargs and llist.c, plus add a test suite entry.  Still no -f support though.

12 years agoFix nanosleep() usage.
Georgi Chorbadzhiyski [Sat, 10 Mar 2012 20:57:33 +0000 (14:57 -0600)]
Fix nanosleep() usage.

12 years agoReplace deprecated libc function with its totally renamed equivalent.
Rob Landley [Sat, 10 Mar 2012 02:33:16 +0000 (20:33 -0600)]
Replace deprecated libc function with its totally renamed equivalent.

12 years agoWork around glibc regression by including Linux header directly.
Rob Landley [Sat, 10 Mar 2012 02:23:08 +0000 (20:23 -0600)]
Work around glibc regression by including Linux header directly.

12 years agoAdd lib/portability.h description with explanation of SWAP() macros.
Rob Landley [Fri, 9 Mar 2012 14:33:57 +0000 (08:33 -0600)]
Add lib/portability.h description with explanation of SWAP() macros.

12 years agoMore stabs at getting #includes right, and moving off of deprecated functions.
Rob Landley [Fri, 9 Mar 2012 02:14:55 +0000 (20:14 -0600)]
More stabs at getting #includes right, and moving off of deprecated functions.

12 years agoFix mkdir -p to accept paths that already exist, and detect path ending in a file.
Rob Landley [Thu, 8 Mar 2012 02:05:36 +0000 (20:05 -0600)]
Fix mkdir -p to accept paths that already exist, and detect path ending in a file.

12 years agoConsolidate headers.
Rob Landley [Thu, 8 Mar 2012 01:04:50 +0000 (19:04 -0600)]
Consolidate headers.

12 years agoSilence a couple pointless warnings.
Rob Landley [Thu, 8 Mar 2012 01:00:21 +0000 (19:00 -0600)]
Silence a couple pointless warnings.

12 years agoCleanups: use perror_msg() and make mode a global.
Rob Landley [Wed, 7 Mar 2012 03:19:57 +0000 (21:19 -0600)]
Cleanups: use perror_msg() and make mode a global.

12 years agoAdd mkfifo.
Georgi Chorbadzhiyski [Wed, 7 Mar 2012 02:58:13 +0000 (20:58 -0600)]
Add mkfifo.

12 years agoWeb page updates.
Rob Landley [Wed, 7 Mar 2012 02:49:03 +0000 (20:49 -0600)]
Web page updates.

12 years agoComment and whitespace tweaks.
Rob Landley [Wed, 7 Mar 2012 02:48:27 +0000 (20:48 -0600)]
Comment and whitespace tweaks.

12 years agomkdir cleanups: Let umask do its thing at the syscall level, have mode be a global...
Rob Landley [Tue, 6 Mar 2012 05:15:50 +0000 (23:15 -0600)]
mkdir cleanups: Let umask do its thing at the syscall level, have mode be a global to prepare for -m, use do_blah name loopfiles() usually calls, one less redundant mkdir() call, go ahead and modify writeable args instead of strdup(), return before restoring / so error message is better, use perror_msg().

12 years agoAdd mkdir.
Georgi Chorbadzhiyski [Tue, 6 Mar 2012 04:19:36 +0000 (22:19 -0600)]
Add mkdir.

12 years agoFix xargs -0 option.
Rob Landley [Tue, 6 Mar 2012 02:48:35 +0000 (20:48 -0600)]
Fix xargs -0 option.

12 years agowhoami: fix toy description, no code changes
Pere Orga [Sun, 4 Mar 2012 23:25:32 +0000 (00:25 +0100)]
whoami: fix toy description, no code changes

12 years agoAdd clear.
Rob Landley [Sun, 4 Mar 2012 22:43:12 +0000 (16:43 -0600)]
Add clear.

12 years agoAdd tac. (Shell wrapper is smaller, but all-in-one static binary is compelling use...
Rob Landley [Sun, 4 Mar 2012 22:27:21 +0000 (16:27 -0600)]
Add tac. (Shell wrapper is smaller, but all-in-one static binary is compelling use case.)

12 years agoMinor optimization.
Rob Landley [Sun, 4 Mar 2012 07:29:57 +0000 (01:29 -0600)]
Minor optimization.

12 years agoAdd whoami.
Georgi Chorbadzhiyski [Sun, 4 Mar 2012 07:26:48 +0000 (01:26 -0600)]
Add whoami.

12 years agoFix build on slackware-current.
Georgi Chorbadzhiyski [Sun, 4 Mar 2012 07:24:06 +0000 (01:24 -0600)]
Fix build on slackware-current.

12 years agoAdd longopt, refactor so only one instance of each loop, requre = as part of match...
Rob Landley [Sun, 4 Mar 2012 06:50:44 +0000 (00:50 -0600)]
Add longopt, refactor so only one instance of each loop, requre = as part of match, update exit code.

12 years agoImplement printenv command.
Georgi Chorbadzhiyski [Sun, 4 Mar 2012 05:55:27 +0000 (23:55 -0600)]
Implement printenv command.

12 years agoMake floating point support depend on TOYBOX_FLOAT, make 0.1m work.
Rob Landley [Sun, 4 Mar 2012 05:45:01 +0000 (23:45 -0600)]
Make floating point support depend on TOYBOX_FLOAT, make 0.1m work.

12 years agoAdd fraction and extension support to sleep.
Georgi Chorbadzhiyski [Sun, 4 Mar 2012 04:55:33 +0000 (22:55 -0600)]
Add fraction and extension support to sleep.

12 years agoAdd -A to ls
Andre Renaud [Sun, 4 Mar 2012 00:17:49 +0000 (18:17 -0600)]
Add -A to ls

12 years agoAdded tag 0.2.1 for changeset 9bcc288a1c54
Rob Landley [Sun, 4 Mar 2012 00:17:26 +0000 (18:17 -0600)]
Added tag 0.2.1 for changeset 9bcc288a1c54

12 years agoFix from Georgi Chorbadzhiyski to make cross compiling more robust.
Rob Landley [Sat, 3 Mar 2012 16:56:11 +0000 (10:56 -0600)]
Fix from Georgi Chorbadzhiyski to make cross compiling more robust.

12 years agoThis uses floating point.
Rob Landley [Sat, 3 Mar 2012 02:18:17 +0000 (20:18 -0600)]
This uses floating point.

12 years agoAdd copyright notice, fluff out help text, use xexec().
Rob Landley [Sat, 3 Mar 2012 02:18:02 +0000 (20:18 -0600)]
Add copyright notice, fluff out help text, use xexec().

12 years agoOnly show one normal difference (sans -l) and EOF message should go to stdout, not...
Rob Landley [Fri, 2 Mar 2012 14:33:01 +0000 (08:33 -0600)]
Only show one normal difference (sans -l) and EOF message should go to stdout, not stderr.

12 years agoCleanup pass, and support unrecognized slash chars ala "echo -e \p".
Rob Landley [Fri, 2 Mar 2012 14:27:50 +0000 (08:27 -0600)]
Cleanup pass, and support unrecognized slash chars ala "echo -e \p".

12 years agoAdd -n, which kernel build needs.
Rob Landley [Fri, 2 Mar 2012 03:36:20 +0000 (21:36 -0600)]
Add -n, which kernel build needs.

12 years agoNow that generated/Config.probed is its own file, add it to build dependencies.
Rob Landley [Tue, 28 Feb 2012 12:34:35 +0000 (06:34 -0600)]
Now that generated/Config.probed is its own file, add it to build dependencies.

12 years agoMake documentation even fluffier.
Rob Landley [Tue, 28 Feb 2012 12:34:09 +0000 (06:34 -0600)]
Make documentation even fluffier.

12 years agoAdd "-" type to optargs and teach tail.c to use it. Tighten up help text, use xzallo...
Rob Landley [Tue, 28 Feb 2012 06:29:52 +0000 (00:29 -0600)]
Add "-" type to optargs and teach tail.c to use it.  Tighten up help text, use xzalloc() and xputc() as appropriate.

12 years agoUpgrade yesno() and make cp -i use it.
Rob Landley [Tue, 28 Feb 2012 03:56:49 +0000 (21:56 -0600)]
Upgrade yesno() and make cp -i use it.

12 years agoThe aboriginal linux build needs ls -ditc and probably some more unimplemented option...
Rob Landley [Mon, 27 Feb 2012 04:04:37 +0000 (22:04 -0600)]
The aboriginal linux build needs ls -ditc and probably some more unimplemented options yet...

12 years agoWeb page tweaks. Remove background image (makes it hard ot read for some people...
Rob Landley [Mon, 27 Feb 2012 03:53:15 +0000 (21:53 -0600)]
Web page tweaks.  Remove background image (makes it hard ot read for some people), and use local roadmap instead of third party wiki.

12 years agoTeach patch -p that consecutive /// counts as one path component.
Rob Landley [Mon, 27 Feb 2012 03:52:07 +0000 (21:52 -0600)]
Teach patch -p that consecutive /// counts as one path component.

12 years agoTeach lib/args.c that " " this option must take a _separate_ argument, so "kill ...
Rob Landley [Sun, 26 Feb 2012 22:11:25 +0000 (16:11 -0600)]
Teach lib/args.c that " " this option must take a _separate_ argument, so "kill -stop" and "kill -s top" aren't the same thing. Make kill.c use it, and remove leftover debug printfs.

12 years agoFactor out common code between killall/kill and move it to lib/lib.c, plus cleanups...
Rob Landley [Sun, 26 Feb 2012 19:48:00 +0000 (13:48 -0600)]
Factor out common code between killall/kill and move it to lib/lib.c, plus cleanups on kill.c.

12 years agoImplemented -i for cp
Bryce Fricke [Fri, 24 Feb 2012 03:08:27 +0000 (22:08 -0500)]
Implemented -i for cp

12 years agoDon't mix the the probed symbols with the command symbols.
Rob Landley [Fri, 24 Feb 2012 03:03:18 +0000 (21:03 -0600)]
Don't mix the the probed symbols with the command symbols.

12 years agoBugfix: use the right USE symbol.
Rob Landley [Fri, 24 Feb 2012 02:56:10 +0000 (20:56 -0600)]
Bugfix: use the right USE symbol.

12 years agoAdd tail.
Timothy Elliott [Thu, 23 Feb 2012 19:51:13 +0000 (11:51 -0800)]
Add tail.

Disabled by default because the -f option is not implemented.

12 years agoupdate id to be SUS compliant
Daniel Walter [Wed, 22 Feb 2012 03:39:20 +0000 (21:39 -0600)]
update id to be SUS compliant

 * add -n and -G flag
 * allow a username to be given as argument
 * display complete list of groups
 * include it in default build

12 years agoReplace GPL python debug script with BSD shell script.
Rob Landley [Wed, 22 Feb 2012 03:27:10 +0000 (21:27 -0600)]
Replace GPL python debug script with BSD shell script.

12 years agoAdd in the -n support, and the 64-bit defines. Force ls to act as ls -1 if used in...
Andre Renaud [Wed, 22 Feb 2012 02:48:52 +0000 (20:48 -0600)]
Add in the -n support, and the 64-bit defines. Force ls to act as ls -1 if used in a pipe.