aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-01-10Fix perror_exit_raw.Elliott Hughes
Some things are worse when you remove the 'p'.
2016-01-10Make cursor left/right change sort type in iotop.Rob Landley
2016-01-08Fix cat -.Elliott Hughes
Commit 4b4ab6a50998 broke loopfiles' handling of "-". This broke the existing cat tests, so no new test is necessary here.
2016-01-08The sense of -L was flipped.Elliott Hughes
2016-01-07Make scan_key() specify timeout in miliseconds, split out terminal_probesize(),Rob Landley
add function key definitions and shift/ctrl/alt cursor keys.
2016-01-05Add error_msg_raw() and friends, replace error_msg("%s", s) uses, enable formatRob Landley
checking, and fix up format checking complaints. Added out(type, value) function to stat to avoid a zillion printf typecasts.
2016-01-05Some utf8/unicode stress test files.Rob Landley
2016-01-05Work towards making "find . -execdir echo {} + -execdir ls {} +" work,Rob Landley
(not finished yet) plus some error message improvements.
2016-01-02Fix find --prune.Rob Landley
2016-01-02Fix "find . -exec echo {}" segfault, and stop measuring environment space,Rob Landley
The segfault was spotted/fixed by Daniel K. Levy back in September, and again by Isabella Parakiss yesterday. While we're there, remove the environment size measurement code (the 128k limit was lifted by linux commit b6a2fea39318, which went into 2.6.22 released July 2007).
2016-01-01First pass at iotop.Rob Landley
Lotsa TODOs: Currently exit it with ctrl-c, not q. Doesn't show totals, PID instead ofTID, PR instead of PRIO (type/pri), human_readable can't display fixed point, IO isn't a percentage, COMM instead of COMMAND (so no [kernelthread] brackets), and no cursor left/right to change sort field...
2015-12-31Tweak error message.Rob Landley
2015-12-30Don't let mktemp -q /path/to/file delete arbitrary files, and don't haveRob Landley
"mktemp -u > /dev/full" leave file around.
2015-12-30lsb/mktemp: Add -u flagKylie McClain
The -u flag creates a file, and unlinks it before exiting. This is usually known as "unsafe mode", or "dry-run" mode. GNU mktemp has it, as does Busybox's mktemp and likely many others.
2015-12-30First half of iotop. Add READ, WRITE, IO, DREAD, DWRITE, SWAP, DIO, andRob Landley
corresponding percentile fields to ps. Move FLAG_ macro usage to ps-specific code (top/iotop have their own flag contexts). Split init and match code into shared and ps-specific parts. Fix bug in COMMAND for privileged processes.
2015-12-30Add more keys to scan_key() and fix hang in scan_key_getsize().Rob Landley
2015-12-30make "ls -m | cat" assume 80 columns.Rob Landley
2015-12-30I didn't add comma_args() to lib.c, I added it with the other comma functions.Rob Landley
(Oops. Missed a file checkin, build break, my bad.)
2015-12-29Add strafter() to lib.Rob Landley
2015-12-29Make pidof use comma_scan()Rob Landley
2015-12-29Move comma_args() from ps.c to lib.Rob Landley
(Moved header a while ago, forgot to check in function move.)
2015-12-27Add scan_key_getsize() doing the ANSI probe, switch scan_key() to TAGGED_ARRAY,Rob Landley
and add test_scankey.
2015-12-24Move get_line() header to pending.h because posix has FILE * versions.Rob Landley
2015-12-23Factor out draw_str() and friends.Rob Landley
2015-12-22First guess at cp xattr support, ala --preserve=context,xattrRob Landley
2015-12-22Convert cp from magic constants to TAGGED_ARRAY()Rob Landley
2015-12-21Cleanup tail -f.Rob Landley
2015-12-21Rich Felker's reading of posix is that fchown() and fchmod() must be allowedRob Landley
on files opened read-only, so revert last commit (force writeable logic).
2015-12-21Add ps -o psr,rtprio,sched.Elliott Hughes
These three are currently available in Android's ps but not in toybox ps.
2015-12-21Implement tail -f.Josh Gao
2015-12-19Redo linestack to handle embedded NULs.Rob Landley
2015-12-19Start of vi.Rob Landley
2015-12-18Next giant chunk of ps work: add _NAME_TAG bitmask values to tags.hRob Landley
(leading underscore version is 1<<NAME_TAG version, with 1LL for >31 shift), suck lots of magic constants out of ps and use tag macros instead, redo command line display so there's now 6 variants (CMD COMM ARGS from posix, NAME CMDLINE from android, and COMMAND for completeness). Document more cases where posix is nuts or widely ignored.
2015-12-16Don't discard previous block when mkstatus finds another span tag with same id.Rob Landley
2015-12-13Start of TAGGED_ARRAY() infrastructure.Rob Landley
This lets you have struct arrays with a string as the first member, ala: struct {char *name; int x, y} blah thingy[] = TAGGED_ARRAY(BLAH, {"one", 1, 2}, {"two", 3, 4}, {"three", 5, 6} ); And it produces #defines for the array index of each, ala: #define BLAH_one 0 #define BLAH_two 1 #define BLAH_three 2 So you can use thingy[BLAH_two].x and still reorder the elements at will. Note: if you screw up the array initializers, temporarily replace TAGGED_ARRAY(BLAH, with { and the ); with }; and the compiler will give you better error messages. (With the macro the compiler reports errors on the TAGGED_ARRAY line, not where the comma is missing in its contents.) Currently the TAGGED_ARRAY( and ); must be on their own lines, and the { and start of each attached string must be on the same line.
2015-12-12Make "ps -o TIME+ -k TIME+" work. Factor out -o field names, field lengths,Rob Landley
and slot numers into a structure. (Keeping multiple arrays in sync may have been efficient but it was ugly.) Fix duplicate command name copying that corrupted the name of kernel threads. Tighten up slot[] docs.
2015-12-12Add a useless memset (under CFG_TOYBOX_DEBUG) to shut up valgrind.Rob Landley
Valgrind complains that we add uninitalized memory to totals[] fields we never read from. (If we didn't set it in entrylen() we don't use it during display, they're testing the same flags), but valgrind doesn't understand that.
2015-12-10Expand toys.optargs to 64 bits so people adding more options to ls don't run ↵Rob Landley
out. Keep the low 32 bits of FLAG_x constants as 32 bit numbers so that at least on little endian platforms it's still normal 32 bit math outside of lib/args.c.
2015-12-09tail: use off_t instead of ssize_t for file offset.Josh Gao
2015-12-06Rename dirtree->data to dirfd, and don't store symlink length in it.Rob Landley
2015-12-06Attempt at making cpio chown() mode 000 files sanely.Rob Landley
2015-12-06Remove trailing whitespace and wrap lines to 80 chars.Rob Landley
2015-12-06CPIO: Add --no-preserve-owner option.Mike Moreton
2015-12-06Correct setting of guid and uid when extracting from a cpio archive.Mike Moreton
2015-12-06Enable matching any perm bits.Gilad Arnold
Includes tests for the new feature, and a failure case for the minimal perms test as well. Also some typo fixing / massaging the help text so it fits in 80 columns.
2015-12-06Add free -h, based on a patch from Isabella Parakiss.Rob Landley
2015-12-05Add start of top infrastructure to ps, null terminate some stridx() searches,Rob Landley
move slot[] documentation into C code, add PR %VSZ VIRT RES SHR
2015-12-04Tom Marshall reported that blkid was handling ext2 wrong.Rob Landley
Even though ext2 has a comment that it has to be at the start, I added swap to the start of the array (oops). The test suite was also wrong (it was matching the _incorrect_ output).
2015-12-04Replace duplicate sed test with case we hadn't covered yet.Rob Landley
2015-12-01Twitter's page seems reasonably simple and straightforward, use that.Rob Landley