aboutsummaryrefslogtreecommitdiff
path: root/toys
AgeCommit message (Collapse)Author
2022-04-15Thinko spotted by Elliott: actually compare with variable, not if (constant).Rob Landley
2022-04-12Comment template tweak.Rob Landley
2022-04-11Update man page URL in hello/skeleton examples, and fix hello toRob Landley
wait for PID 1. (rdinit=/bin/hello would kernel panic if pid 1 exits, and wait() returns "No child processes" error, so pause() instead.)
2022-04-08More wget cleanup.Rob Landley
Fix path, null terminate THIS line instead of chomp() whole header (no guarantee the line we're looking for is last, although if it isn't inserting the null terminator would truncate later searches), don't assume server sent back a valid header with a " " in first line (it SHOULD, but might not), don't interpret "-" filename from remote end as stdout.
2022-04-08Cleanup pass on wget.Rob Landley
TT.postdata -> TT.p, replace both WGET_IS_HTTP macros with a test in wget_info() setting TT.https (although still want an HTTP macro to include the WGET_SSL test because I don't trust the compiler to do dead code elimination based on a global in a union), inline wget_redirect() and wget_filename() at their only caller, use xmprintf() for request rather than copying user-defined strings into toybuf without bounds checking, try not to assume other side sent us good data.
2022-04-04Add "ifconfig eth0 rename NEWNAME".Rob Landley
2022-04-04realpath should parse -eRob Landley
The test USED to work because "unknown option -e" was ALSO an error, until last commit passed through the -e...
2022-04-04When args.c is just enforcing max/min argument count with no options, imply ?Rob Landley
so "command -123" isn't an unknown option error.
2022-04-04Earlier test ensures dev isn't null when !FLAG(a), so don't test same again.Rob Landley
2022-04-04Minor cleanups, and switch lll to "long long" for 32 bit platforms.Rob Landley
2022-04-03Fix a segfault due to a wrong order global variables of wgetMoritz C. Weber
2022-04-03Replaced sizeof by strlen in wget POSTMoritz C. Weber
2022-04-02Add tar --strip-components.Rob Landley
Also in lib/ add bufget name variants for password and group.
2022-04-01Cleanup openvt/deallocvt and merge with chvt, promote out of pending.Rob Landley
2022-03-31Make tar tests more portable, and add --owner :UID and --group :GIDRob Landley
2022-03-26Added basic post-data supportMoritz C. Weber
2022-03-26Update docs.Rob Landley
2022-03-26Cleanup pass and make -O - write to stdout.Rob Landley
Teach chomp() to remove any number of trailing \r\n
2022-03-22Fix a memory leak and update reference after discarding blank pipeline segment.Rob Landley
2022-03-19The ".." removal logic was looping on file/dir names starting with "..",Rob Landley
reported by hg42 on github.
2022-03-16file(1): call out apparently invalid ELF files.Elliott Hughes
Realistically, corrupt ELF files are rare enough that it's more likely that we've actually found a bug in file(1), such as the .bss bug fixed in the previous patch. That bug went undiscovered so long because we silently give up on ELF files we don't understand, and the output didn't look obviously broken even if you'd been told it was broken and were looking at it. Give up noisily instead so we find and fix any future bugs more quickly. Also remove some duplicated code: the commit that switched to mmap(2) rather than lseek(2) had two copies of the mmap call.
2022-03-16file: don't be confused by BSS sections.Elliott Hughes
BSS sections are *expected* to claim a larger size than is actually present in the file. Unlike program headers which have two different size fields for the memory and file sizes, sections headers only have one size field, so we're using the right field; we just need to ignore it for our overflow checking purposes.
2022-03-10Add "cd -", teach cd to handle deleted directories, fix ${X: -1:1}Rob Landley
2022-03-06Minor tweaks.Rob Landley
2022-03-03Add spaces to lsusb output, trigger on the correct entries, tweak help text.Rob Landley
2022-02-22Add top -h to show bar graphs (start of htop plumbing).Rob Landley
Only does memory/swap so far.
2022-02-22Traverse doubly linked list non-infinitely.Rob Landley
(Can't test this, don't have the hardware, so trying to do only simple cleanups. Still screwed it up.)
2022-02-22Minor cleanups.Rob Landley
2022-02-22gpiod: new commands.Elliott Hughes
Equivalent to the content of the gpiod debian package. Very different interface to the traditional Raspberry Pi command, but that command explicitly calls itself deprecated and tells you to use the gpiod package's commands instead. "Works for me" on a Raspberry Pi 400, with a (small) variety of things connected to GPIOs as inputs and outputs. Missing gpiomon, which -- since the rest of these are about a year old at this point -- it doesn't look like I'm going to get around to writing any time soon unless someone asks for it...
2022-02-21Merge lspci.c with lsusb.c to share infrastructure.Rob Landley
The lspci database loading code should work now, and it can be stored .gz, and the output is closer to the host version.
2022-02-16Move a struct from lib.h into the one toys/pending command that uses it.Rob Landley
2022-02-16flags.h can #define its own CLEANUP_ macros for the next #includeRob Landley
so gearshifts between flag contexts require less setup.
2022-02-16Factor out parse_dev_ids() into its own function.Rob Landley
2022-02-13Create the timer after installing the SIGALRM handler.Rob Landley
2022-02-12Search a path for usb.ids and handle usb.ids.gz via zcat.Rob Landley
2022-02-11Minor cleanups.Rob Landley
2022-02-11lspci: use a different default location for pci.ids on Android.Elliott Hughes
2022-02-07Fix -newerXY and add test.Rob Landley
2022-01-30Move ANSI escape cheat sheet to tty.cRob Landley
2022-01-29Top: move sort change to SHIFT LEFT/RIGHT, and make LEFT/RIGHT move list.Rob Landley
(It's actually skipping X many fields at the start, up to showing just the last field across the whole screen. I could continue into indent to show more of the last field, but probably need to add a way to freeze updates first.)
2022-01-20Fix sed bug with multiple w to same file.Rob Landley
2022-01-11vi: fix recent changes.Elliott Hughes
vi was segfaulting because some of the printf() arguments were the wrong way round. The file content also wasn't getting displayed because [%dH isn't a correct translation of tty_jump(0, y). Personally, although I agree that tty_esc() wasn't pulling its weight, I think that tty_jump() was: the escape sequence's arguments are the wrong way round, they're both off-by-one, and the rules for the short forms don't make sense to humans, just to 1970s hardware. Also remove the implicit flush from the inner redraw loop, which was causing visible flicker (I've left the others since they don't matter).
2022-01-10vi: fix build.Elliott Hughes
xputsn() only takes one argument; the other place this function outputs the same escape sequence just uses printf() (rather than xprintf()) so that seems fine here too. One flush per screen refresh is plenty (and there are still *lots* left).
2022-01-10Let lsusb to use /etc/usb.ids for english descriptions.Rob Landley
2022-01-09Reword some command directory READMEs (this tweaks menuconfig display).Rob Landley
2022-01-09Cleanup nl (it had a stale TODO entry).Rob Landley
Also, the user of FLAG(E) depended on it being 1 and it wasn't, finish -E test.
2022-01-08File time's realtime output and switch to clock_gettime().Rob Landley
2022-01-03Replace \033 with \e in strings.Rob Landley
2022-01-03Remove tty_esc() and tty_jump() wrappers, just output ANSI directly.Rob Landley
2022-01-03Have -B remove more characters Ted Tso's implementation doesn't emit.Rob Landley