aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2015-11-29Implement ps --sort.Rob Landley
2015-11-29Add basic sort logic.Rob Landley
2015-11-28Split out string_field() from show_ps().Rob Landley
2015-11-28Save string offsets rather than recalculating them each time, and use structRob Landley
instead of carving up toybuf by hand. This makes breaking out the field conversion logic into its own function less expensive.
2015-11-26Split do_ps() into get_ps() and show_ps() as a start on implementing --sort.Rob Landley
Change readfileat() to pass back length of read.
2015-11-19Fix find -perm.Elliott Hughes
1) It read st_dev instead of st_mode. 2) It reversed the semantics of absolute vs minimal ('-' prefixed) tests. Add tests for these, and move the "unterminated -exec" test into the "Still fails" section because it's still dumping core for me.
2015-11-16TypoRob Landley
2015-11-16Rewrite of the about page, re-triage of sbase, and other documentation updates.Rob Landley
2015-11-14Documentation tweaks.Rob Landley
2015-11-12Document %s in date(1).Elliott Hughes
2015-11-12Fix year parsing in date(1).Elliott Hughes
Four-digit years were being mangled by the code for two-digit years. Move all the two-digit year code into the "we only saw two digits" case. Add some new tests and fix existing tests.
2015-11-09Cleanup pass: inline find_tty_name(), bounds check fscanf(), use libcRob Landley
functions to read major()/minor(), fix printf format warnings in error msg.
2015-11-09Make ps try harder to find a name for a tty.Elliott Hughes
2015-11-09On Android, ps' default output should match toolbox.Elliott Hughes
2015-11-09Add ps -n.Elliott Hughes
Both Android and GNU interpret -n to mean "show numeric users and groups", despite what POSIX says.
2015-11-09Add ps -o CMDLINE.Elliott Hughes
This is equivalent to Android's historical "NAME" column, showing the first element of /proc/pid/cmdline.
2015-11-08NOEXIT(thingy()) wrapper to turn xwrap() functions into warning versions.Rob Landley
Also WOULD_EXIT(x, thingy()) to set a variable to 1 or 0 showing whether or not thingy() tried to exit. I'd love to be able to do "x = NOEXIT(thingy());" but haven't figured out a syntax to make that work yet...
2015-11-08Route cleanup: whitespace and curly bracket changes.Rob Landley
2015-11-08Bugfix for route flags.Rob Landley
2015-11-08Remove TEST_ARGV() and logic to adjust irtt by "clock ticks/100" when clock ↵Rob Landley
ticks _is_ 100...
2015-11-07More route cleanup.Rob Landley
2015-11-07Let's start the route cleanup.Rob Landley
Collate some repeated increments, remove some useless coments.
2015-11-05Fix sed bug where any ] right after [ was skipped, not just first one in range.Rob Landley
2015-11-03dhcp leanup: remove flag_get() and flag_chk()Rob Landley
2015-11-03New dhcp6 command from Sameer Pradhan.Rob Landley
2015-11-03Version 0.6.10.6.1Rob Landley
2015-11-03Whitespace and parentheses.Rob Landley
2015-11-02Explain signals in oneit help text.Rob Landley
2015-11-02Don't pass target $CFLAGS to host builds (telling x86 compiler to be big-endianRob Landley
seldom ends well). Instead add -DBUILD_FOR_HOST to $HOSTCC and wrap #ifdefs around problematic (smack) includes from toys.h.
2015-11-02Add -P as short option for --ppid.Rob Landley
(The help infrastructure can collate and alphebetize short options, long options haven't got a standardized help text format. Not a hard requirement to have a short opt, but it's nice.)