aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-10-14make.sh: missing cflags for config2helpAlejandro Joya
config2help might require extra parameters to be passed to the compiler. For example it might need an additional header path.
2015-10-11Cleanup pass on pgrep: remove flag_twiddle macros, use 0 constants,Rob Landley
unify some TT.signame tests checking constant value variable initialized to.
2015-10-10"stat -c %T" support (filesystem type names) based on patch from Hyejin Kim.Rob Landley
2015-10-06Decode netlink sockets in lsof.Elliott Hughes
Refactor the /proc/net parsing so this only adds 7 lines overall. Also clear the DEVICE field for sockets and fix alignment for long usernames (until someone implements the two-pass output that measures columns).
2015-10-06New command: flock.Elliott Hughes
The brillo folks wanted this in a shell script they're porting over (so I've only implemented the fd style they wanted, not the named file style).
2015-10-05Fix bug in od that screwed up position indicator on arm and mips.Rob Landley
2015-10-05Fix allnoconfig. (Exporting HOSTCC before HOSTCC?=cc caused a problem.)Rob Landley
2015-10-04Export makefile variables so you can say "make CROSS_COMPILE=blah-" as well ↵Rob Landley
as "CROSS_COMPILE=blah- make".
2015-10-04Minor cleanup and add "MODALIAS" handler (suggested by Isaac Dunham).Rob Landley
2015-10-03Back to chipping away at ps...Rob Landley
2015-10-02Add uClinux analysis to roadmap, and a few other pending changes.Rob Landley
2015-09-29help_exit() tweak.Rob Landley
2015-09-29xvfork went away.Rob Landley
2015-09-29Make defconfig build for nommu.Rob Landley
Adds XVFORK() macro, teaches xpopen_both() to call /proc/self/exe with NULL argv (and converts cpio -p to use that), adds TOYBOX_FORK guards to some unconverted commands.
2015-09-27Another chunk of nommu support, replacing toys.recursion with toys.stacktop.Rob Landley
2015-09-23xexec() is noreturn.Rob Landley
2015-09-23Add xvfork() as a static inline and use it from various places.Rob Landley
Note: vfork(), like fork(), can return -1 if too many processes, and we should notice and fail loudly.
2015-09-23The -o /dev/null trick in probing isn't compatible with elf2flt, so use ↵Rob Landley
tempfile.
2015-09-17Fix a couple things gcc is too dumb to figure out on its own.Rob Landley
2015-09-14Add find tests.Daniel K. Levy
2015-09-12Fix a find segfault.Rob Landley
Elliott Hughes found a bug https://android-review.googlesource.com/#/c/170020/ and Daniel K. Levy worked out the problem: the user/group/newer arguments to find weren't consuming their arguments when not checking the results of their comparison (because an earlier test had already caused their parenthetical group to fail). This confused the argument parsing logic and could lead to segfaults. I applied a different fix that reorganized the existing tests instead of adding a new test. (Looks like a big commit but it's mostly whitespace due to extra curly brackets changing indendentation levels.)
2015-09-11Replace toys.exithelp with help_exit() in lib.Rob Landley
2015-09-08Squish more warnings in pending.Rob Landley
2015-09-08Squish a warning in pending.Rob Landley
2015-09-08Fix netstat -e.Elliott Hughes
The -e flag should add "user" and "inode" columns to the TCP output. Also truncate IP addresses in non-wide (no -W) mode. This also removes a bit more of the duplication, though there's still plenty left in this file!
2015-09-08i already did -l and -t, the positive side of -p, plus name filtering...Elliott Hughes
2015-09-08Fix netstat -p.Elliott Hughes
netstat -p was failing for any cmdline longer than 21 characters. (A typical Chrome render process has about half a kilobyte of cmdline.) There's still a lot of cleanup to be done later, but this is enough to fix -p and remove a fair amount of unnecessary custom code into the bargain.
2015-09-08increase the size of progname to avoid buffer overflowLipi Lee
2015-09-07Remove prompt argument from yesno(), caller can fprintf(stderr, "blah") itself.Rob Landley
This fixes the build break, the change to yesno() prototype accidentally got checked in last commit. (Oops, sorry.)
2015-09-06Switch HR_SI to HR_1000, make binary the default, make HR_B only affect bytes,Rob Landley
and update the tests.
2015-09-05Two large thinkos in oneit: -3 was always enabled and signal numbers wereRob Landley
overwritten before we set up signal handlers.
2015-09-05Add seq -f tests, tweak help text, and catch one more error case.Rob Landley
2015-09-05ls -h support.Elliott Hughes
It turns out that people are anticipating the switch to toybox ls from toolbox ls on the assumption that this will finally bring -h support. Let's not disappoint. I've merged two existing buffers in listfiles whose uses didn't overlap into one. It may be possible to cram this into toybuf with the other stuff, but it didn't seem worth the extra complexity for 64B of stack, especially since we were already living with that for time formatting anyway.
2015-09-05df -h and -H.Elliott Hughes
This doesn't address the lack of support for a variable-width "Filesystems" column, but it doesn't make the current situation any worse either. This is the last of the missing -h options. The other commands with -h also have --si, but only for df did it get a corresponding short option (and I've never personally used --si on du or ls, so let's wait until someone actually cares).
2015-09-03Implement lsof.Elliott Hughes
This is a superset of the current AOSP lsof (which is itself a superset of the lsof in Android M). It fixes several bugs/misfeatures and adds support for decoding IPv4/IPv6 tcp/udp/raw sockets and Unix domain sockets.
2015-09-03Make human_readable() handle base 1024 units without floating point.Rob Landley
Rounds correctly via brute force, displayed digits are decimal even when working with powers of 2, shows at most 3 significant (decimal) digits. (So no "1023M" nonsense, that's 1.0G.)
2015-09-02seq -f %0-f is a valid pattern.Rob Landley
2015-09-02If you start a git commit and then edit the file more on the filesystemRob Landley
before saving, the updates don't go in the commit. Behavior difference between git and mercurial, that. Good to know.
2015-09-02Sanitize seq -f string.Rob Landley
2015-09-02vmstat: fix units for bi and bo columnsColin Cross
pgpgin and pgpgout in /proc/vmstat are in kbytes, not pages. (see http://lxr.free-electrons.com/source/mm/vmstat.c?v=4.2#L1310). Remove the extra * page_kb for io_in and io_out.
2015-09-01Trivial code style tweak.Rob Landley
2015-09-01vmstat: reset header pointer when loopingColin Cross
Modifying the headers pointer when printing the headers causes a buffer overrun the second time they are printed. Use a local header pointer that is reset to the beginning of the buffer for each loop.
2015-08-31ls -l user/group/security context should be left-aligned.Elliott Hughes
Right-aligned looks pretty good to me, but it's not what anyone else does.
2015-08-31Work around bug in gcc 5.2.0 that miscompiles linux 2.6.12's kconfig.Rob Landley
2015-08-30Fix mv on overwrite.Elliott Hughes
We need to remove the destination, not the source, to be able to overwrite.
2015-08-30Add portability.h glue to let uptime build without TOYBOX_UTMPX.Rob Landley
2015-08-30Build updates: make change should use top level .config for global settings,Rob Landley
add NOSTRIP variable to force skipping strip, and save intermediate flag data in generated/flags.raw and have mkflags.c error message point to that.
2015-08-29Menuconfig option for musl-libc pretending mmu is just pining for the fijords.Rob Landley
2015-08-25Static analysis from Hyejin Kim found possible pointer underflow.Rob Landley
Now that the kernel's 128k environment size has been lifted, it might be possible to feed in a gigabyte of suffix so argv[2] is enough larger than argv[1] that char *s decrements past NULL and points to arbitrary high memory (I.E. strlen(suffix) > (long)base), at which point the base > s test is defeated and we strcmp() against a wild pointer. Which is read only anyway and on 64 bit you probably couldn't hit any interesting addresses, but the fix is easy enough: compare strlen values instead of pointers. So do that instead.
2015-08-20I discovered that the reason SIGINT causes a reboot on sysvinit is thatIsaac Dunham
it's how the kernel signals that ctrl-alt-delete has been pressed; thus, setting it as the signal for reboot prevents ctrlaltdel scripts from working. SIGTERM is what Busybox uses, so we might as well be compatible.