aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-09-22When killall was invoked without arguments, there appeared segmentation fault?ukasz Szpakowski
2014-09-22Fix du test: du symlink -> "0\tsymlink"Felix Janda
2014-09-22Respond to two static analysis issues in dirtree_path() reported by Ashwini ↵Rob Landley
Sharma. dirtree->name is an array, not a pointer, so can't be zero. Remove the test. We dereference plen without checking it for null but calling dirtree_path(0, 0) is pilot error: only the _first_ call can have plen = 0. Add a comment.
2014-09-21Start on ping.c.Rob Landley
2014-09-20Tweak portability.h for uClibc version in buildroot defconfig.Rob Landley
I've been locally patching uClibc to not violate posix-2008 (you don't need to define a GNU macro to get a posix function), but uClibc is obsolete and moribund (development peaked in 2006, last bugfix release was over 2 years ago), and the largest remaining user (buildroot) doesn't bother to apply such a patch. Since even buildroot is slowly migrating to musl-libc, just do the portability tweak for what the last release of the old thing actually did.
2014-09-20Always call setlocale if I18N is enabled, so nested toy_exec() can switch it ↵Rob Landley
back off if necessary.
2014-09-20Delete generated/README.txt (the contents are in code.html now) so clean can ↵Rob Landley
just remove the "generated" directory entirely.
2014-09-20Capitalize "toybox" more consistently on the about page.Rob Landley
2014-09-20Fluff out the documentation some more.Rob Landley
2014-09-20Remove debug echo checked in by mistake.Rob Landley
2014-09-20Forgot to check in the updated makefile when I moved the testsuite.Rob Landley
(Did you know you can test individual commands with scripts/test.sh command? Now you do...)
2014-09-20Typo from the dawn of time: toybox is not capitalized the way BusyBox was.Rob Landley
It's just a word. Capitalize at the start of the sentence, otherwise don't. Yeah, it could be always capitalized as a proper name but since the command "toybox" is all lower case, that would be weird.
2014-09-20The ancient GPL (copied from the 2.6.12 kernel) build infrastructure is ↵Rob Landley
actually in the "kconfig" directory, not under scripts. Remind me to write a new one from scratch... (Someone actually submitted a basic kconfig rewrite in awk once, but until I bite the bullet and write my own awk.c, I just don't know awk well enough to maintain a large script written in it. Back when I maintained kernel.org/doc I wrote http://landley.net/hg/kdocs/file/tip/make/menuconfig2html.py but I am NOT reintroducing python as a build dependency. And neither actually implemented actual menuing part. So... todo list.)
2014-09-20Move testsuite out of scripts/test into its own top level tests directory, ↵Rob Landley
and make ctrl-c kill "make test" more reliably.
2014-09-20Give library probe a progress indicator, and use 150% of detected CPUs to ↵Rob Landley
try to keep large SMP machines busy (each compiler invocation is short so they exit almost as fast as we launch them).
2014-09-18Reorder functions to get rid of unnecessary prototypes, and move a global ↵Rob Landley
into GLOBALS.
2014-09-18rm -rf needs to chmod directories to u+rwx, because directories need +x to ↵Isaac Dunham
search. (Fixes messages about not being able to delete directories when running make test).
2014-09-18A few fixes for issues reported in static analysis.Ashwini Sharma
2014-09-17Cleanup pass on README.Rob Landley
Other versions are adding Cached from /proc/meminfo to free buffers/cache (and subtracting it from used), but sysinfo() doesn't provide it. (But it provide "high memory", which hasn't been relevant for almost a decade...) But that's a design change, not a cleanup issue.
2014-09-17Update README for pending directory, include list of code outside of pending ↵Rob Landley
(grandfathered) awaiting cleanup.
2014-09-17Minor cleanup pass on touch.Rob Landley
2014-09-17Cleanup pass on cut, more to do.Rob Landley
Cut predates the "pending" directory, so was checked in as-is. Ashwini Sharma's recent static analysis fixes touched this file, but there's a lot more to do than the static analyzer found.
2014-09-16Cleanup pass on useradd.Rob Landley
2014-09-14Add cpio -pRob Landley
2014-09-14find -xdev should return mount points, just not contents.Rob Landley
2014-09-14Second attempt at one way xpopen().Rob Landley
2014-09-14Split xpopen() into xpopen_both(), xpopen(), and xrun() depending on whether ↵Rob Landley
we want to redirect both, one, or neither of stdin/stdout.
2014-09-13Bug report from luckboy: rm -f on a broken symlink didn't work because our ↵Rob Landley
"does it exist" test (to avoid errors on rm -f of nonexistent files) said it didn't. The fix: replace the access() with unlink(), which produces the same "does not exist" errno and has the added bonus of acting as a fastpath for rm -f on non-directories. (And since it produces a different error on directories, falls through to the old behavior there.) Most of this commit is comment updates explaining being subtle. :)
2014-09-11Create a generated/build.sh with a single compiler command line to rebuild ↵Rob Landley
the toybox_unstripped binary using the existing generated/*.h files. This way we can snapshot the generated/*.{h,sh} from a defconfig build into a "shipped" directory or something, and then people can maybe build on crazy crippled environments like pcbsd that haven't got gmake and put bash under /usr/local so none of the #!/scripts can find it. This solves at least part of the "toybox can build with itself but you need to build toybox first to have the tools to run the build scripts" problem. Next up: work out the minimal config to provide the build tools needed to run an actual build. (This should, eventually, include a "make" command if freebsd's kernel is going to refuse to build with netbsd's "make" and we don't just write off the whole thing as crazy. But it probably shouldn't include commands that #include <linux/*.h> if we are trying to make that work.)
2014-09-11Oops, unbreak make.sh.Rob Landley
Clearing out old .o files needs -r now that generated/obj has its own subdirectory. (Works if you make clean between, but shouldn't need it.)
2014-09-09Ignore -m option to cpio, it's what we do anyway so it's not an error.Rob Landley
2014-09-09Two problems: 1) Sometimes toy_exec() needs to re-exec to gain dropped root ↵Rob Landley
permissions, 2) shouldn't recurse forever without exec, stack depth increases and we may leak other resources. Limit it to ~5 levels.
2014-09-09Make tweaks: collate generated/*.o files into their own subdirectory, add ↵Rob Landley
PIPEFAIL for better error reporting, and simpler regex to select toys/*/*.c list based on NEWTOY/OLDTOY macros.
2014-09-08Fix more memory leaks reported by Ashwini Sharma.Rob Landley
2014-09-08Don't close device handle until after calling flush ioctls, reported by ↵Rob Landley
Ashwini Sharma.
2014-09-08Add error test and fix memory leak, reported by Ashwini Sharma.Rob Landley
2014-09-07Promote mount. It's not perfect, but it basically works now.Rob Landley
2014-09-07Fix mount --move bug.Rob Landley
2014-09-07Debugging pass on mount. Not quite done yet, but the basics seem to work now.Rob Landley
2014-09-06Work around uClibc brain-damage.Rob Landley
2014-09-04Don't hang for $CPUS=1.Rob Landley
echo prints a newline if it has nothing to print, so wc -l always returns at least 1. Fix: echo -n
2014-09-03Testsuites for toybox command - "tar", "bzcat", "xzcat", "zcat" and "hostname".Divya Kothari
2014-09-03chmod testsuite and link testsuite.Divya Kothari
Chmod ? In this testsuite after change file mode bits, we are comparing file mode with expected ones. One additional "." is coming with modes (actual result). That?s why test cases are getting failed. This patch will remove additional "." from actual result. Link ? Added more test cases.
2014-09-01Add cp -F to force delete of existing destination files, and make install ↵Rob Landley
command use that. -F is equivalent to the gnu/dammit flag --we-think-long-options-without-short-options-are-a-good-idea
2014-08-31More parallel build tweaks.Rob Landley
echo "$PENDING" needs the quotes to avoid gluing the lines together, which prevents wc -l or head -n +2 from working right.
2014-08-31Next mount checkpoint.Rob Landley
Testing level: It compiled. If any portion of this works, I'll be amazed. Still a bunch of todo items (see giant TODO block after globals)
2014-08-31Give a hint when setuid logic fails.Rob Landley
Toybox expects to be setuid root; setuid some other user confuses the attempt to drop privileges, and we err on the side of avoiding shenanigans.
2014-08-30Old compilers complain about linker options passed with -c, so split out ↵Rob Landley
$LDOPTIMIZE.
2014-08-30Another fix from Johan Bergstr?m, using the gnu/dammit version of sort on ↵Rob Landley
the host can be screwed up by more than one environment variable.
2014-08-30Add VERBOSE=fail to "make tests", based on suggestion from Johan Bergstr?m.Rob Landley