Rob Landley [Fri, 10 Apr 2015 05:14:56 +0000 (00:14 -0500)]
Tweak .gitignore.
Rob Landley [Tue, 7 Apr 2015 19:59:32 +0000 (14:59 -0500)]
Tweak README
Rob Landley [Tue, 7 Apr 2015 19:57:55 +0000 (14:57 -0500)]
Update multiplexer help text for --version
Rob Landley [Wed, 8 Apr 2015 09:20:31 +0000 (04:20 -0500)]
Revert last mdev commit because it copied code out of a GPLv2 program.
Guys, you CANNOT COPY CODE FROM BUSYBOX. I don't care if I was the initial
author of that file, other people have touched it since.
I know I added "pending" because I couldn't keep up with code review in
realtime and stuff was getting lost, so we needed a place to park things
before they underwent the full dorodango process. I also know none of the
binaries I distribute has anything in pending enabled. But dude, if I'm going
to find stuff like this I have to start reviewing the code BEFORE applying
it to pending, and we all know where that leads.
Please don't do this again.
Rob Landley [Tue, 7 Apr 2015 16:54:36 +0000 (11:54 -0500)]
Adding --version broke ./toybox command list. (Oops.)
Rob Landley [Mon, 6 Apr 2015 01:00:33 +0000 (20:00 -0500)]
Announce switch to git.
Rob Landley [Mon, 6 Apr 2015 00:23:36 +0000 (19:23 -0500)]
Add --version to multiplexer.
Can't think of a better place to stick the actual version info than a #define
at the top of main. Makefile and toys.h are equally awkward, querying git
tags wouldn't work if building a release tarball... watch me forget to update
this when cutting a release.
Rob Landley [Mon, 6 Apr 2015 00:21:39 +0000 (19:21 -0500)]
Bite the bullet and switch over to git.
Paul Barker [Sat, 4 Apr 2015 16:58:06 +0000 (11:58 -0500)]
To ensure that toybox can be installed alongside busybox without
confusing update-alternatives, the paths of the links installed by toybox should
match those installed by busybox. This is accomplished by changing the flags
of a few tools within toybox.
Rob Landley [Sat, 4 Apr 2015 06:26:58 +0000 (01:26 -0500)]
Another in-progress ps snapshot.
Rob Landley [Fri, 3 Apr 2015 16:49:31 +0000 (11:49 -0500)]
Add readfileat() to lib
Rob Landley [Fri, 3 Apr 2015 16:46:44 +0000 (11:46 -0500)]
ps checkpoint du jour. Does not work yet.
Rob Landley [Thu, 2 Apr 2015 20:07:36 +0000 (15:07 -0500)]
Redoing ps from scratch. Random checkpoint that probably doesn't even compile.
Checking in a stopping point where I figured out what I did wrong, before changing it.
Rob Landley [Sun, 29 Mar 2015 17:03:46 +0000 (12:03 -0500)]
Add head test for -123.
Rob Landley [Sun, 29 Mar 2015 17:01:30 +0000 (12:01 -0500)]
Fix head bug pointed out by felix janda (recent -123 code broke first file argument of -n).
Rob Landley [Sun, 29 Mar 2015 01:21:03 +0000 (20:21 -0500)]
Fix sed bug David Halls hit trying to compile libiconv.
Rob Landley [Sat, 28 Mar 2015 18:22:27 +0000 (13:22 -0500)]
Fix printf bug (%.s should be %.0s not %s) reported by Isabella Parakiss.
Elliott Hughes [Sat, 28 Mar 2015 18:13:42 +0000 (13:13 -0500)]
Fix an obvious typo in Makefile.
Elliott Hughes [Sat, 28 Mar 2015 07:53:08 +0000 (02:53 -0500)]
update the Android section of roadmap.html
Four obsolete tools were removed from Android, and runcon moved to toybox.
Rob Landley [Sat, 28 Mar 2015 03:03:13 +0000 (22:03 -0500)]
Promote setenforce to android.
Rob Landley [Sat, 28 Mar 2015 03:00:17 +0000 (22:00 -0500)]
Cleanup setenforce.
Rob Landley [Sat, 28 Mar 2015 02:54:58 +0000 (21:54 -0500)]
Promote getenforce.
Rob Landley [Sat, 28 Mar 2015 02:52:24 +0000 (21:52 -0500)]
Cleanup getenforce.
Rob Landley [Sat, 28 Mar 2015 02:41:14 +0000 (21:41 -0500)]
Flag to make llvm shut up about a broken warning.
Rob Landley [Sat, 28 Mar 2015 02:25:44 +0000 (21:25 -0500)]
tail: add old -123 support and comment out #-f until it's actually implemented.
Rob Landley [Sat, 28 Mar 2015 01:50:28 +0000 (20:50 -0500)]
Promote load_policy to android.
Rob Landley [Sat, 28 Mar 2015 01:48:12 +0000 (20:48 -0500)]
Minor cleanup of load_policy.
Rob Landley [Thu, 26 Mar 2015 18:25:20 +0000 (13:25 -0500)]
Explain the craptacular nature of kconfig, and the plan to replace it.
Bernhard Rosenkr?nzer [Wed, 25 Mar 2015 18:46:34 +0000 (13:46 -0500)]
Fix toybox build with C99 compilers
toybox "make menuconfig" currently fails to build if the compiler is in C99
mode (clang 3.6 and gcc 5.0 snapshots default to C99 mode, you can also
reproduce the failure with older gcc by using 'make menuconfig HOSTCC="gcc
-std=gnu99"').
The problem is that inline semantics changed in C99, and kconf_id_lookup's
inline-ness depends on C89 semantics there.
Elliott Hughes [Tue, 24 Mar 2015 19:17:03 +0000 (14:17 -0500)]
Implement load_policy.
Note that this is a case where Android's tool isn't the same as the
usual tool. Ours takes an explicit file containing the policy to be
loaded. restorecon is at least command-line compatible, but the
implementation is all in Android's libselinux where there's a
selinux_android_restorecon function.
Rob Landley [Mon, 23 Mar 2015 18:45:47 +0000 (13:45 -0500)]
Promote runcon to android (and add an android menu).
Rob Landley [Mon, 23 Mar 2015 18:09:48 +0000 (13:09 -0500)]
Trivial runcon cleanups.
Elliott Hughes [Mon, 23 Mar 2015 17:46:20 +0000 (12:46 -0500)]
Add runcon(1).
Elliott Hughes [Mon, 23 Mar 2015 17:39:05 +0000 (12:39 -0500)]
add missing space in dd output
Also, coreutils says "s" instead of "seconds". POSIX specifies the
format of the previous two lines, but doesn't even mention this line.
Rob Landley [Mon, 23 Mar 2015 16:49:58 +0000 (11:49 -0500)]
Tweak of Elliott Hughes's fix for an off by one error in human_readable
(137 returned "137 KB".)
Elliott Hughes [Mon, 23 Mar 2015 16:44:56 +0000 (11:44 -0500)]
Update the Android section of the roadmap.
I've removed the reference to fs_mgr, since that's really part of vold
rather than a subset of mount(1), and I've removed the reference to
ifconfig because we're already using the toybox ifconfig and the
reference in this document to the Android command that it referred to
(netcfg) was already removed.
Rob Landley [Sat, 21 Mar 2015 22:15:09 +0000 (17:15 -0500)]
Another bug from David Halls: find -exec wasn't consuming its argument when it didn't activate.
test: find . -name README -exec echo one '{}' ';' -or -exec echo two '{}' ';'
Rob Landley [Sat, 21 Mar 2015 20:49:38 +0000 (15:49 -0500)]
install -D bugfix from David Halls.
(I tweaked some comment text while I was there.)
Rob Landley [Sat, 21 Mar 2015 20:29:21 +0000 (15:29 -0500)]
Patch from David Halls to fix mac/ios portability issue.
Rob Landley [Thu, 19 Mar 2015 18:57:02 +0000 (13:57 -0500)]
Add -123 support to head (suggested by Elliott Hughes).
Hyejin Kim [Wed, 18 Mar 2015 21:32:01 +0000 (16:32 -0500)]
mdev : add hotplugin feature
As internal needs, Ranjan Kumar (ranjankumar.bth at gmail.com) added hotplug
feature into mdev.
Rob Landley [Mon, 16 Mar 2015 18:27:16 +0000 (13:27 -0500)]
Fix mount -a segfault without -O, reported by Janus Troelsen.
Rob Landley [Mon, 16 Mar 2015 18:25:29 +0000 (13:25 -0500)]
Rename a function to better describe what it does.
Hyejin Kim [Mon, 16 Mar 2015 00:29:15 +0000 (19:29 -0500)]
I added error handling code in write_rotate().
I think that it is better to check tf->logfd before doing
truncate()/write() and getting error.
Rob Landley [Sat, 14 Mar 2015 17:34:14 +0000 (12:34 -0500)]
More ps cleanup, mostly refactoring.
Rob Landley [Sat, 14 Mar 2015 02:33:34 +0000 (21:33 -0500)]
Minor ps refactoring.
Rob Landley [Sat, 14 Mar 2015 02:17:33 +0000 (21:17 -0500)]
Clean up sort help text.
Use tabs for option indent and don't have -g show up in menu (TOYBOX_FLOAT is
the decision).
Rob Landley [Thu, 12 Mar 2015 20:34:03 +0000 (15:34 -0500)]
Switch nsenter to default y.
Rob Landley [Thu, 12 Mar 2015 20:32:50 +0000 (15:32 -0500)]
Implement shred -u and switch to default y in defconfig.
Rob Landley [Thu, 12 Mar 2015 20:16:13 +0000 (15:16 -0500)]
Remove cat -v help text debris.
Rob Landley [Thu, 12 Mar 2015 19:27:36 +0000 (14:27 -0500)]
The time command depends on floating point support.
Rob Landley [Thu, 12 Mar 2015 19:21:33 +0000 (14:21 -0500)]
Make find accept numeric uid/gid, and simplify makedevs using the new infrastructure.
Rob Landley [Thu, 12 Mar 2015 19:20:10 +0000 (14:20 -0500)]
Make install support numeric uid/gids (reported by Kylie McClain).
Rob Landley [Thu, 12 Mar 2015 16:11:08 +0000 (11:11 -0500)]
Factor out xgetgrnamid() and xgetpwnamid() into xwrap.c.
Rob Landley [Thu, 12 Mar 2015 04:05:54 +0000 (23:05 -0500)]
Fix mktemp when TMPDIR is set to empty string, reported by Kylie McClain.
Rob Landley [Tue, 10 Mar 2015 19:37:03 +0000 (14:37 -0500)]
Add -m to mknod
Rob Landley [Tue, 10 Mar 2015 16:07:28 +0000 (11:07 -0500)]
Use xsignal() instead of signal().
Rob Landley [Mon, 9 Mar 2015 20:06:10 +0000 (15:06 -0500)]
Fix thinko (don't &toybuf to get scratch space) and add -v option.
Rob Landley [Mon, 9 Mar 2015 19:52:32 +0000 (14:52 -0500)]
Upgrade oneit with -r (restart), -3 (send exiting PID values to child), and signal handling.
Rob Landley [Fri, 6 Mar 2015 22:50:54 +0000 (16:50 -0600)]
sed depends on -r to be rightmost flag to simplify the REG_EXTENDED test.
(If a flag is 1, you can multiply it by the value you want and get that value
else zero without a branch or conditional assignment.) So move -E one to the
left so FLAG_r is 1 again, and add a [+Er] suffix instead of testing
FLAG_r | FLAG_E in the users.
Rob Landley [Fri, 6 Mar 2015 21:12:52 +0000 (15:12 -0600)]
The "no }" error with find | xargs sed is because toy_init() wasn't blanking the GLOBALS() block on a recursive call. (How that ever worked...)
Rob Landley [Fri, 6 Mar 2015 21:11:38 +0000 (15:11 -0600)]
Yank $STRIP from config (and STRIP=no weirdness) and just allow strip to fail.
Hyejin Kim [Wed, 4 Mar 2015 13:29:57 +0000 (07:29 -0600)]
scripts/mkflags.c : main function need return 0 if normal exit
Rob Landley [Wed, 4 Mar 2015 04:06:55 +0000 (22:06 -0600)]
Quick cleanup pass on tar.
Rob Landley [Tue, 3 Mar 2015 02:27:50 +0000 (20:27 -0600)]
On 64 bit, subtracting two pointers produces a long result. On 32 bit, it's an int. Even though long _is_ 32 bits on a 32 bit systems, gcc warns about it because reasons.
Also, the warning being that "expects int, but type is wchar_t"... no, type
is not wchar_t. Type is probably long. Specify the ACTUAL TYPE, not the random
typedef alias for it. If the translated type _did_ match, there wouldn't
be a warning! (This is why c89 promoted all arguments to int, precisely
so this wasn't a problem.)
Rob Landley [Sun, 1 Mar 2015 22:43:01 +0000 (16:43 -0600)]
Fix several printf_format warnings.
Rob Landley [Sun, 1 Mar 2015 22:35:05 +0000 (16:35 -0600)]
Only switch on printf format warnings for error_exit() and friends when TOYBOX_DEBUG enabled.
One again gcc manages to be incompetent about producing warnings. For example,
in bzcat we error_exit() with a message that's an error code fed into an
array of string constants, and apparently dereferencing an array of string
literals doesn't give you a string literal according to -Wformat-security.
Not breaking the code to humor the compiler here, the compiler is wrong.
Elliott Hughes [Sun, 1 Mar 2015 22:16:50 +0000 (16:16 -0600)]
let the compiler check format strings
i'll be AFK for a week, so here's the patch i've been using this
evening to find other format string mistakes. BSD uses __printflike
and takes two arguments instead of hard-coding (1,2), but i figured
that as long as you don't need the generality you'd prefer not to have
it. and it's easy enough to retrofit if we ever do have a formatting
function that takes other arguments.
Elliott Hughes [Sun, 1 Mar 2015 22:11:50 +0000 (16:11 -0600)]
fix format problems in tar.c
%o is unsigned, but off_t is signed.
* takes an int.
an error_msg call was missing an argument.
only one of these is an actual error, but i'd like to fix the others
too so that we (toybox, but if not, then Android) can turn on format
string warnings to prevent future bugs like the stat.c LP32 ones.
Rob Landley [Sun, 1 Mar 2015 22:08:51 +0000 (16:08 -0600)]
Patches from Elliott Hughes to fix various printf() format strings.
(Don't specify the space flag when it's the default behavior. The ifconfig
stuff was actual bugs.)
Rob Landley [Sun, 1 Mar 2015 21:58:40 +0000 (15:58 -0600)]
Patches from Elliott Hughes to add missing arguments to error_exit() calls.
Elliott Hughes [Sun, 1 Mar 2015 21:48:49 +0000 (15:48 -0600)]
remove accidental space in format string
the ' ' flag makes no sense for %c.
Elliott Hughes [Sun, 1 Mar 2015 21:35:48 +0000 (15:35 -0600)]
fix copy/paste-o in useradd.test
Rob Landley [Fri, 27 Feb 2015 18:17:30 +0000 (12:17 -0600)]
Cleanup pass on ps.
Rob Landley [Fri, 27 Feb 2015 14:13:24 +0000 (08:13 -0600)]
0.5.2 release notes.
Rob Landley [Sun, 1 Mar 2015 01:54:03 +0000 (19:54 -0600)]
Minor toysh cleanup: remove another unnecessary option.
Isabella Bosia [Sat, 28 Feb 2015 21:21:13 +0000 (15:21 -0600)]
BSD sed uses -E instead of -r to enable ERE.
GNU sed silently supports -E as an alias for -r too.
Rob Landley [Sat, 28 Feb 2015 18:39:16 +0000 (12:39 -0600)]
Add LDFLAGS and STRIP=no support.
Rob Landley [Sat, 28 Feb 2015 18:35:12 +0000 (12:35 -0600)]
Add "make change" output to .hgignore
Rob Landley [Fri, 27 Feb 2015 03:07:33 +0000 (21:07 -0600)]
More 'splaining.
Rob Landley [Thu, 26 Feb 2015 02:42:24 +0000 (20:42 -0600)]
Added tag 0.5.2 for changeset
8ce8c5365f8b
Rob Landley [Wed, 25 Feb 2015 06:45:50 +0000 (00:45 -0600)]
stat -f didn't work on 32 bit systems because type sizes wrong (fix from Elliott Hughes).
Rob Landley [Wed, 18 Feb 2015 21:19:15 +0000 (15:19 -0600)]
Patch from Isaac Dunham to add -r, fixed up so it doesn't try to include two flag contexts simultaneously.
Yeongdeok Suh [Wed, 18 Feb 2015 19:06:26 +0000 (13:06 -0600)]
Separate 'userdel' from testing syntax.
When I test toybox with toybox/tests/*.test scripts,
I got many false FAILs from it. So, I tried to fix useradd.test file.
Rob Landley [Sun, 15 Feb 2015 21:44:26 +0000 (15:44 -0600)]
Add --remove-destination longopt for -F because the host version doesn't have a shortopt for it.
Rob Landley [Sun, 15 Feb 2015 21:27:43 +0000 (15:27 -0600)]
Only discard optargs in toy_exec() after finding the command to run (otherwise the fallback exevp() segfaults).
Rob Landley [Sat, 14 Feb 2015 20:59:30 +0000 (14:59 -0600)]
Make egrep and fgrep build standalone.
Rob Landley [Sat, 14 Feb 2015 20:54:36 +0000 (14:54 -0600)]
Fix --help for single.sh builds.
Rob Landley [Sat, 14 Feb 2015 20:05:00 +0000 (14:05 -0600)]
Split out unix2dos so scripts/single.sh and "make change" can build it standalone.
Rob Landley [Sat, 14 Feb 2015 07:08:15 +0000 (01:08 -0600)]
Move guts of "make change" to scripts/change.sh, don't try to build sh or help standalone.
sh builtin commands need multiplexer, help describes other enabled commands.
Rob Landley [Thu, 12 Feb 2015 22:41:59 +0000 (16:41 -0600)]
Fix bug introduced by last commit (print template instead of toybuf).
Also, xstrdup() the unmodified template because changing the environment string
could make the changed version show up in "ps".
Rob Landley [Wed, 11 Feb 2015 23:10:28 +0000 (17:10 -0600)]
Only apply mktemp directory to targets that aren't already paths.
Rob Landley [Wed, 11 Feb 2015 04:51:23 +0000 (22:51 -0600)]
Fix longopts (pointed out by Hyejin Kim).
Rob Landley [Mon, 9 Feb 2015 23:47:29 +0000 (17:47 -0600)]
One more cleanup pass on hwclock factoring out common code.
Rob Landley [Mon, 9 Feb 2015 23:33:59 +0000 (17:33 -0600)]
Inline rtc_open() and get_rtc_seconds(), perform resulting cleanups.
Rob Landley [Mon, 9 Feb 2015 22:34:24 +0000 (16:34 -0600)]
Cleanup/refactoring pass on hwclock.
Inline open_wall_clock_rtc() into rtc_open(), factor out xtzset(),
inline set_sysclock_from_hwclock(), set_hwclock_from_sysclock(),
and set_sysclock_timezone().
/etc/adjtime is short enough we don't need to bother with a break.
The final "else" case in main() should always trigger because >0 in optstr
says "at most zero arguments", so the || at the end is always true, so
take the test off.
Rob Landley [Sun, 8 Feb 2015 22:38:38 +0000 (16:38 -0600)]
Promote chcon to "other".
Rob Landley [Sun, 8 Feb 2015 22:38:11 +0000 (16:38 -0600)]
Cleanup pass on chcon.
Rob Landley [Sun, 8 Feb 2015 22:33:24 +0000 (16:33 -0600)]
Rewrite of a patch from Elliott Hughes to implement touch -h and switch API to utimensat() which offers nanosecond granularity and UTIME_OMIT/UTIME_NOW.
Rob Landley [Sun, 8 Feb 2015 22:27:30 +0000 (16:27 -0600)]
For some reason, ifconfig was explicitly excluding "ifconfig lo:0 127.0.0.2" style alias address assignments. No idea why.