platform/upstream/toybox.git
10 years agoPromote blockdev to other.
Rob Landley [Sun, 24 Aug 2014 04:08:59 +0000 (23:08 -0500)]
Promote blockdev to other.

10 years agoCleanup blockdev.
Rob Landley [Sun, 24 Aug 2014 04:08:04 +0000 (23:08 -0500)]
Cleanup blockdev.

10 years agogetty needs fd 0 to stay open.
Isaac Dunham [Sat, 23 Aug 2014 04:34:52 +0000 (23:34 -0500)]
getty needs fd 0 to stay open.
The O_CLOEXEC reversal resulted in login failing.

10 years agoPromote inotifyd to other.
Rob Landley [Thu, 21 Aug 2014 03:23:39 +0000 (22:23 -0500)]
Promote inotifyd to other.

10 years agoMinor help text tweak for inotifyd.
Rob Landley [Thu, 21 Aug 2014 03:22:46 +0000 (22:22 -0500)]
Minor help text tweak for inotifyd.

10 years agoCleanup inotifyd.
Rob Landley [Thu, 21 Aug 2014 03:21:36 +0000 (22:21 -0500)]
Cleanup inotifyd.

10 years agoCleanups on useradd/groupadd/groupdel, and put TOYBOX_UID_SYS and TOYBOX_UID_USR...
Rob Landley [Tue, 19 Aug 2014 00:10:45 +0000 (19:10 -0500)]
Cleanups on useradd/groupadd/groupdel, and put TOYBOX_UID_SYS and TOYBOX_UID_USR in the top level Config.

10 years agoAdd install to cp/mv.
Rob Landley [Sat, 16 Aug 2014 14:46:42 +0000 (09:46 -0500)]
Add install to cp/mv.

10 years agoFix bug reported by Ashwini Sharma: [-abc] syntax to switch off a command forget
Rob Landley [Fri, 15 Aug 2014 23:53:01 +0000 (18:53 -0500)]
Fix bug reported by Ashwini Sharma: [-abc] syntax to switch off a command forget
s _all_ saved command line arguments in GLOBALS(), not just for the command bein
g dropped.

10 years agoIf string_to_mode() is called on a base mode with S_ISDIR() and such set, pass those...
Rob Landley [Fri, 15 Aug 2014 15:50:39 +0000 (10:50 -0500)]
If string_to_mode() is called on a base mode with S_ISDIR() and such set, pass those extra bits through.

10 years agoEnable a command's sub-options in single builds.
Rob Landley [Tue, 12 Aug 2014 23:05:55 +0000 (18:05 -0500)]
Enable a command's sub-options in single builds.

10 years agoA toy _BLOCKDEV_ to get/set block device properties.
Ashwini Sharma [Tue, 12 Aug 2014 12:14:58 +0000 (07:14 -0500)]
A toy _BLOCKDEV_ to get/set block device properties.

10 years agoPatches to commands for issues reported from static analysis tool.
Ashwini Sharma [Tue, 12 Aug 2014 12:09:01 +0000 (07:09 -0500)]
Patches to commands for issues reported from static analysis tool.

portability.h.patch - it is for O_CLOEXEC, as compiler complained of it.
Makefile.patch - for cleaning generated/*.o files and libopts.dat file

[Fixup to uniq.c from Rob.]

10 years agoPromote lspci.
Rob Landley [Tue, 12 Aug 2014 01:15:19 +0000 (20:15 -0500)]
Promote lspci.

10 years agoCleanup pass on lspci.
Rob Landley [Tue, 12 Aug 2014 01:11:58 +0000 (20:11 -0500)]
Cleanup pass on lspci.

10 years agoUpdate clean to clean up after new parallel build.
Rob Landley [Sun, 10 Aug 2014 17:01:49 +0000 (12:01 -0500)]
Update clean to clean up after new parallel build.

10 years agoDisable xopen's default O_CLOEXEC for oneit.
Rob Landley [Sun, 10 Aug 2014 04:49:48 +0000 (23:49 -0500)]
Disable xopen's default O_CLOEXEC for oneit.

10 years agoParallelize the build. (set CPUS=1 to force single processor build, or another number...
Rob Landley [Sat, 9 Aug 2014 19:33:34 +0000 (14:33 -0500)]
Parallelize the build. (set CPUS=1 to force single processor build, or another number to override processor count autodetect.)

10 years agoFix -mindepth and -maxdepth to not drill down into excluded directories.
Rob Landley [Fri, 8 Aug 2014 04:19:18 +0000 (23:19 -0500)]
Fix -mindepth and -maxdepth to not drill down into excluded directories.

The fact other implementations don't implement "! -mindepth" doesn't mean we can't. Also, find uses +N, N, -N for everything else but this extension doesn't. Also, -depth already had a definition and this has nothing to do with that. It's a poorly thought-out extension, is what I'm saying.

10 years agoMore find bugfixes.
Rob Landley [Wed, 6 Aug 2014 04:21:18 +0000 (23:21 -0500)]
More find bugfixes.

10 years agoRereading posix find.c page: "Specifying more than one of the mutually-exclusive...
Rob Landley [Wed, 6 Aug 2014 00:44:59 +0000 (19:44 -0500)]
Rereading posix find.c page: "Specifying more than one of the mutually-exclusive options -H and -L shall not be considered an error. The last option specified shall determine the behavior of the utility."

10 years agofind.c: Posix wants loop detection.
Rob Landley [Wed, 6 Aug 2014 00:41:36 +0000 (19:41 -0500)]
find.c: Posix wants loop detection.

10 years agoBuilding busybox from source needs find -not (a synonym for posix's "!").
Rob Landley [Wed, 6 Aug 2014 00:32:44 +0000 (19:32 -0500)]
Building busybox from source needs find -not (a synonym for posix's "!").

10 years agoFix a couple patch bugs concerning error output.
Rob Landley [Wed, 6 Aug 2014 00:27:02 +0000 (19:27 -0500)]
Fix a couple patch bugs concerning error output.

10 years agofind.c: add -mindepth, -maxdepth, and document -newer and -depth.
Rob Landley [Tue, 5 Aug 2014 00:28:41 +0000 (19:28 -0500)]
find.c: add -mindepth, -maxdepth, and document -newer and -depth.

10 years agoImplement exec -user, -group, and -newer. Enable find in defconfig.
Rob Landley [Sun, 3 Aug 2014 20:50:10 +0000 (15:50 -0500)]
Implement exec -user, -group, and -newer. Enable find in defconfig.

10 years agoSquash mix of tabs and spaces to just spaces.
Rob Landley [Sun, 3 Aug 2014 02:07:43 +0000 (21:07 -0500)]
Squash mix of tabs and spaces to just spaces.

10 years agoMissed checking in dirtree_recurse() change (now needs specific DIRTREE_SYMFOLLOW...
Rob Landley [Sun, 3 Aug 2014 00:54:38 +0000 (19:54 -0500)]
Missed checking in dirtree_recurse() change (now needs specific DIRTREE_SYMFOLLOW value, not just true/false).

10 years agoCosmetic tweak, slightly more conventional for loop.
Rob Landley [Sun, 3 Aug 2014 00:52:44 +0000 (19:52 -0500)]
Cosmetic tweak, slightly more conventional for loop.

10 years agoYank xrealpath prototype since the function's gone.
Rob Landley [Sun, 3 Aug 2014 00:50:03 +0000 (19:50 -0500)]
Yank xrealpath prototype since the function's gone.

10 years agoAdd --help support to single.sh builds.
Rob Landley [Sun, 3 Aug 2014 00:49:10 +0000 (19:49 -0500)]
Add --help support to single.sh builds.

10 years agoUnbreak find -exec.
Rob Landley [Sun, 3 Aug 2014 00:40:35 +0000 (19:40 -0500)]
Unbreak find -exec.

10 years agoNew toys unified DIFF and USERDEL.
Ashwini Sharma [Sat, 2 Aug 2014 17:00:20 +0000 (12:00 -0500)]
New toys unified DIFF and USERDEL.

10 years agomix.c - A very basic mixer.
Bradley Conroy [Sat, 2 Aug 2014 16:49:30 +0000 (11:49 -0500)]
mix.c - A very basic mixer.

10 years agofactor: catch integer overflow.
Rob Landley [Fri, 1 Aug 2014 23:50:46 +0000 (18:50 -0500)]
factor: catch integer overflow.

Now factor 9223372036854775783 (largest positive 64 bit signed prime) takes a
couple minutes but gives the right answer.

10 years agoAdd factor.
Rob Landley [Fri, 1 Aug 2014 14:08:00 +0000 (09:08 -0500)]
Add factor.

I was reading http://www.muppetlabs.com/~breadbox/txt/rsa.html and it mentioned
"factor" and I noticed it was in coreutils. I'm not sure why it's in coreutils,
but it's pretty trivial, so...

10 years agofind.c: fix -iname.
Rob Landley [Thu, 31 Jul 2014 01:21:13 +0000 (20:21 -0500)]
find.c: fix -iname.

10 years agoAs long as I had to write xabspath(), no point in wrapping realpath().
Rob Landley [Thu, 31 Jul 2014 00:22:55 +0000 (19:22 -0500)]
As long as I had to write xabspath(), no point in wrapping realpath().

10 years agofind.c: first pass at case case insensitivity and exec. (Needs more debugging.)
Rob Landley [Wed, 30 Jul 2014 01:04:38 +0000 (20:04 -0500)]
find.c: first pass at case case insensitivity and exec. (Needs more debugging.)

10 years agoActually set the again flag when calling the dirtree comeagain callback.
Rob Landley [Wed, 30 Jul 2014 01:02:31 +0000 (20:02 -0500)]
Actually set the again flag when calling the dirtree comeagain callback.

10 years agoPatch from Isaac Dunham to work around the deficiencies in musl's regex engine (which...
Rob Landley [Sun, 27 Jul 2014 20:19:49 +0000 (15:19 -0500)]
Patch from Isaac Dunham to work around the deficiencies in musl's regex engine (which break building under alpine linux).

Musl's regex engine doesn't support \| which changes the behavior of busybox
sed, breaks toybox grep... I need to come up with a musl patch, in the meantime
here's a workaround.

10 years agoMove DIRTREE_COMEAGAIN second callback up to when the filehandle is still open, and...
Rob Landley [Sat, 26 Jul 2014 18:30:40 +0000 (13:30 -0500)]
Move DIRTREE_COMEAGAIN second callback up to when the filehandle is still open, and add dir->again variable to distinguish second call instead of checking for -1 filehandle.

10 years agoDefault xcreate/xopen to O_CLOEXEC. (Pass O_CLOEXEC in the flags to switch it back...
Rob Landley [Sat, 26 Jul 2014 18:27:07 +0000 (13:27 -0500)]
Default xcreate/xopen to O_CLOEXEC. (Pass O_CLOEXEC in the flags to switch it back off.)

This way we're not leaking filehandles to children from things like find -exec.

10 years agoDocument more cleanup.
Rob Landley [Sat, 26 Jul 2014 18:22:59 +0000 (13:22 -0500)]
Document more cleanup.

10 years agoHave single.sh enable I18N and FLOAT.
Rob Landley [Tue, 22 Jul 2014 01:03:06 +0000 (20:03 -0500)]
Have single.sh enable I18N and FLOAT.

10 years agoImprove gid/uid error messages.
Rob Landley [Tue, 22 Jul 2014 00:57:36 +0000 (19:57 -0500)]
Improve gid/uid error messages.

10 years agoLittle endian and big endian versions of peek (for host.c).
Rob Landley [Tue, 22 Jul 2014 00:56:53 +0000 (19:56 -0500)]
Little endian and big endian versions of peek (for host.c).

10 years agoFix memory leak in error path.
Rob Landley [Tue, 22 Jul 2014 00:55:06 +0000 (19:55 -0500)]
Fix memory leak in error path.

10 years agoDon't go into an endless loop if we hit a bad utf8 sequence without -q.
Rob Landley [Mon, 21 Jul 2014 03:08:46 +0000 (22:08 -0500)]
Don't go into an endless loop if we hit a bad utf8 sequence without -q.

10 years agoIsaac Dunham spotted that dhcp was also reimplementing daemon().
Rob Landley [Mon, 21 Jul 2014 02:34:49 +0000 (21:34 -0500)]
Isaac Dunham spotted that dhcp was also reimplementing daemon().

10 years agoAdd utf8 support to ls -C.
Rob Landley [Sun, 20 Jul 2014 21:34:36 +0000 (16:34 -0500)]
Add utf8 support to ls -C.

Use wcwidth() instead of strlen(), and extend the -q substitution to also
whiteout nonprintable characters that are nonparseable utf8 snippets.

10 years agofind needs "c" suffix to -size.
Rob Landley [Sun, 20 Jul 2014 01:54:29 +0000 (20:54 -0500)]
find needs "c" suffix to -size.

10 years agoFind bugfixes.
Rob Landley [Fri, 18 Jul 2014 23:31:41 +0000 (18:31 -0500)]
Find bugfixes.

The check for -print vs -print0 was tested before I optimized out the "-" in the strcmps, and I didn't adjust the offset or retest it. (Ooops.)

Also, I wasn't clearing the ! value when descending into parentheticals, so "find . -name blah -o \! \( -stuff -o -thing \)" acted like it had a spurious second ! before -stuff inside the parentheses.

10 years agoApparently I deleted this locally but forgot to commit the removal. Oops.
Rob Landley [Fri, 18 Jul 2014 03:52:58 +0000 (22:52 -0500)]
Apparently I deleted this locally but forgot to commit the removal. Oops.

10 years agoUse libc daemon() instead of pending daemonize.
Rob Landley [Fri, 18 Jul 2014 03:50:49 +0000 (22:50 -0500)]
Use libc daemon() instead of pending daemonize.

10 years agoWrite a new find. Not quite done, but the basics work.
Rob Landley [Thu, 17 Jul 2014 01:43:58 +0000 (20:43 -0500)]
Write a new find. Not quite done, but the basics work.

10 years agofdisk : partitions > 60, are deleted, offset entry for extended partitions was wrong.
Ashwini Sharma [Mon, 14 Jul 2014 10:44:29 +0000 (05:44 -0500)]
fdisk : partitions > 60, are deleted, offset entry for extended partitions was wrong.
fsck: memory leak/segfault resolved.
ftpget : warning for unused variable 'ptr' removed.

10 years agoImplement -HL for cp.
Rob Landley [Mon, 14 Jul 2014 10:38:27 +0000 (05:38 -0500)]
Implement -HL for cp.

10 years agoRelease notes for 0.4.9.
Rob Landley [Mon, 7 Jul 2014 12:32:56 +0000 (07:32 -0500)]
Release notes for 0.4.9.

10 years agoAdded tag 0.4.9 for changeset ffc015bddb26
Rob Landley [Mon, 7 Jul 2014 12:32:33 +0000 (07:32 -0500)]
Added tag 0.4.9 for changeset ffc015bddb26

10 years agoAutodetect --bind and --loop mounts in a way that doesn't interfere with network...
Rob Landley [Mon, 7 Jul 2014 04:43:29 +0000 (23:43 -0500)]
Autodetect --bind and --loop mounts in a way that doesn't interfere with network filesystems or -t newtype mounts that trigger a module load.

10 years agominor cleanup: move a global variable into GLOBALS(), inline strchr_null(), some...
Rob Landley [Mon, 7 Jul 2014 04:21:13 +0000 (23:21 -0500)]
minor cleanup: move a global variable into GLOBALS(), inline strchr_null(), some whitespace and bracket cleanups.

10 years agoMinor cleanup pass.
Rob Landley [Mon, 7 Jul 2014 04:17:55 +0000 (23:17 -0500)]
Minor cleanup pass.

10 years agoAdd nbd-client.
Rob Landley [Mon, 7 Jul 2014 00:58:49 +0000 (19:58 -0500)]
Add nbd-client.

10 years agoPromote killall5 by merging it into kill.
Rob Landley [Mon, 7 Jul 2014 00:14:05 +0000 (19:14 -0500)]
Promote killall5 by merging it into kill.

Slight conflict here: this puts killall5 in the posix directory. But the commands sharing code trumps that.

10 years agoTry to lookup all umounts in /proc/mounts so we can auto-zap loopback devices.
Rob Landley [Sun, 6 Jul 2014 04:26:05 +0000 (23:26 -0500)]
Try to lookup all umounts in /proc/mounts so we can auto-zap loopback devices.

10 years agoTAR - this supports archive creation and extraction based on the USTAR format (descri...
Ashwini Sharma [Sat, 5 Jul 2014 02:46:00 +0000 (21:46 -0500)]
TAR - this supports archive creation and extraction based on the USTAR format (described in PAX Spec). For (de)compression '-z' gzip is supported.

10 years agoCut down from 1000+ file attribute tests to a more manageable number.
Rob Landley [Sat, 5 Jul 2014 02:21:45 +0000 (21:21 -0500)]
Cut down from 1000+ file attribute tests to a more manageable number.

10 years agoI have developed few testsuites for toybox commands -
Divya Kothari [Sat, 5 Jul 2014 02:20:02 +0000 (21:20 -0500)]
I have developed few testsuites for toybox commands -

1. lsattr/chattr
2. mount
3. chmod
4. pgrep/pkill
5. groupadd
6. groupdel
7. useradd

10 years agoHave "make test" run tests in testdir/testdir instead of same directory as command...
Rob Landley [Fri, 4 Jul 2014 03:09:11 +0000 (22:09 -0500)]
Have "make test" run tests in testdir/testdir instead of same directory as command symlinks. (Makes cleanup easier.)

10 years agodate -r wasn't saving the result in the right variable. (And make date -ur work.)
Rob Landley [Fri, 4 Jul 2014 01:30:52 +0000 (20:30 -0500)]
date -r wasn't saving the result in the right variable. (And make date -ur work.)

10 years agoFix rm -rf of chmod 000 directories.
Rob Landley [Thu, 3 Jul 2014 23:42:44 +0000 (18:42 -0500)]
Fix rm -rf of chmod 000 directories.

10 years agoPromote makedevs to other.
Rob Landley [Mon, 30 Jun 2014 10:05:39 +0000 (05:05 -0500)]
Promote makedevs to other.

10 years agoBugfixes for cleaned up makedevs.
Rob Landley [Mon, 30 Jun 2014 09:58:37 +0000 (04:58 -0500)]
Bugfixes for cleaned up makedevs.

Newline after table = <stdin>, move start/increment/count loop around entire
device creation if/else staircase including chmod/chown code and use ptr to
record node vs toybuf.

10 years agoUse dlist_terminate() in patch.
Rob Landley [Sun, 29 Jun 2014 03:47:40 +0000 (22:47 -0500)]
Use dlist_terminate() in patch.

10 years agoAdd : as an alias for true (toysh needs this).
Rob Landley [Sun, 29 Jun 2014 03:36:02 +0000 (22:36 -0500)]
Add : as an alias for true (toysh needs this).

10 years agoMake fallocate depend on probe for libc support.
Rob Landley [Sun, 29 Jun 2014 03:17:00 +0000 (22:17 -0500)]
Make fallocate depend on probe for libc support.

10 years agoAdd fallocate probe for uClibc.
Rob Landley [Sun, 29 Jun 2014 01:16:11 +0000 (20:16 -0500)]
Add fallocate probe for uClibc.

10 years agoPromote mkpasswd from pending to other.
Rob Landley [Sun, 29 Jun 2014 01:02:57 +0000 (20:02 -0500)]
Promote mkpasswd from pending to other.

10 years agoCleanup read_password(), factor out set_terminal(), fix salt bug (des wants the salt...
Rob Landley [Sun, 29 Jun 2014 01:02:01 +0000 (20:02 -0500)]
Cleanup read_password(), factor out set_terminal(), fix salt bug (des wants the salt raw, no $ at the beginning).

10 years agoUpdate cleanup page, now linking to descriptions of all of the ifconfig cleanup.
Rob Landley [Sat, 28 Jun 2014 03:26:02 +0000 (22:26 -0500)]
Update cleanup page, now linking to descriptions of all of the ifconfig cleanup.

10 years agoI have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd,...
Divya Kothari [Thu, 26 Jun 2014 12:25:20 +0000 (07:25 -0500)]
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.

10 years agoCleanup pass on mkpasswd.c
Rob Landley [Thu, 26 Jun 2014 03:54:59 +0000 (22:54 -0500)]
Cleanup pass on mkpasswd.c

10 years agoCleanup pass on makedevs. Need to test it before promoting.
Rob Landley [Wed, 25 Jun 2014 11:26:17 +0000 (06:26 -0500)]
Cleanup pass on makedevs. Need to test it before promoting.

10 years agoGlibc and uClibc provide CERASE from termios.h, but musl requies you to #include...
Rob Landley [Wed, 25 Jun 2014 02:47:07 +0000 (21:47 -0500)]
Glibc and uClibc provide CERASE from termios.h, but musl requies you to #include a non-posix header and the maintainer considers this a feature. So just use the constant directly.

10 years agofind_in_path() is supposed to work with a NULL path, but didn't. Fix it.
Rob Landley [Tue, 24 Jun 2014 13:19:24 +0000 (08:19 -0500)]
find_in_path() is supposed to work with a NULL path, but didn't. Fix it.

10 years agoTweak license page to explicitly say that zero clause BSD is functionally equivalent...
Rob Landley [Tue, 24 Jun 2014 12:00:13 +0000 (07:00 -0500)]
Tweak license page to explicitly say that zero clause BSD is functionally equivalent to placing the code in the public domain.

This license variant looks like BSD, but is an unrestricted permission grant that doesn't require you to copy specific license text into derivative works. (The second paragraph is about something we DON'T do, I.E. provide any sort of warantee, and is just boilerplate from BSD to make it look like a BSD license.)

10 years agoMove deallocvt.c into openvt.c, cleanup both.
Rob Landley [Tue, 24 Jun 2014 11:42:08 +0000 (06:42 -0500)]
Move deallocvt.c into openvt.c, cleanup both.

10 years agoForgot to check in main() part of TOYFLAG_LOCALE change.
Rob Landley [Sat, 21 Jun 2014 18:03:42 +0000 (13:03 -0500)]
Forgot to check in main() part of TOYFLAG_LOCALE change.

10 years agoThe readme, a text file, has an HTML close paragraph tag.
Rob Landley [Thu, 12 Jun 2014 03:44:48 +0000 (22:44 -0500)]
The readme, a text file, has an HTML close paragraph tag.

(Sheer force of habit.)

10 years agoOption parsing for nohup needs to stop at first nonoption argument. Minor cleanups.
Rob Landley [Thu, 12 Jun 2014 03:43:54 +0000 (22:43 -0500)]
Option parsing for nohup needs to stop at first nonoption argument. Minor cleanups.

10 years agoCleanup pass on login
Rob Landley [Thu, 12 Jun 2014 03:41:25 +0000 (22:41 -0500)]
Cleanup pass on login

10 years agoEnable fallocate in defconfig.
Rob Landley [Thu, 12 Jun 2014 03:18:35 +0000 (22:18 -0500)]
Enable fallocate in defconfig.

10 years agoCleanup pass on host.c
Rob Landley [Thu, 12 Jun 2014 03:14:44 +0000 (22:14 -0500)]
Cleanup pass on host.c

10 years agoMove toys.toycount initialization _after_ zeroing toys, so help -a works again.
Rob Landley [Thu, 12 Jun 2014 03:13:28 +0000 (22:13 -0500)]
Move toys.toycount initialization _after_ zeroing toys, so help -a works again.

10 years agoPromote strings.
Rob Landley [Wed, 11 Jun 2014 13:11:38 +0000 (08:11 -0500)]
Promote strings.

10 years agoCleanup strings.
Rob Landley [Wed, 11 Jun 2014 13:02:55 +0000 (08:02 -0500)]
Cleanup strings.

10 years agoUpdate toybox help to say how to install the static binary.
Rob Landley [Wed, 11 Jun 2014 02:57:05 +0000 (21:57 -0500)]
Update toybox help to say how to install the static binary.

10 years agopending/useradd: unbreak build
Isaac Dunham [Tue, 10 Jun 2014 13:29:10 +0000 (08:29 -0500)]
pending/useradd: unbreak build

When useradd started using xfork(), the conditional in else if (pid > 0)
became unnecessary, since else means pid is nonzero and xfork makes it
non-negative. However, the "if" was not deleted.

10 years agoPromote rfkill.
Rob Landley [Mon, 9 Jun 2014 12:13:05 +0000 (07:13 -0500)]
Promote rfkill.