aboutsummaryrefslogtreecommitdiff
path: root/toys/other
AgeCommit message (Collapse)Author
2016-04-23Fiz bzcat segfault reported by John Regehr (bad crc didn't set error message).Rob Landley
2016-04-14Andy Chu pointed out an out of bounds access for zero length lines.Rob Landley
While we're at it, use unsigned for the line length.
2016-03-23Minor blkid cleanup. (There was a while(ptr[-1]==' ') ptr--; that could fallRob Landley
off the start of the string. I pulled on the thread...)
2016-03-22blkid: Handle short/empty vfat labels; update testsSamuel Holland
vfat labels have a fixed space allocated for them. In the case of a shorter label, the remaining bytes are padded with spaces. A vfat filesystem with no label (i.e. that will show up in Windows as "Local Disk (X:)" or "Removable Disk (X:)") is stored as "NO NAME ". Both of these changes match behavior from util-linux.
2016-03-15Add base64.test, and Izabera pointed out that -w0 should disable wrapping.Rob Landley
2016-03-13factor: use long long math (64 bit on 32 bit platforms) and handle negativeRob Landley
numbers even though we use unsigned math now.
2016-03-03Fix bzcat integer overflow reported by John Regehr.Rob Landley
2016-03-02Fix base64 so == wraps properly.Rob Landley
2016-03-02For years the man pages have said to #include <sys/types.h> to getRob Landley
major/minor/makedev, but glibc has vowed to break existing programs (https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html) and replace it with _another_ non-standard header (not in posix or lsb), so let's just add functions to lib/ that do the transform ourselves.
2016-03-01SYS_finit_module isn't there on Ubuntu 12.04 because it was only added to theRob Landley
3.8 kernel in 2012. That's way too new to assume the build environment has it, so #ifdef and simulate a failure if it's not there.
2016-02-25Fix more warnings on 32 bit builds.Rob Landley
2016-02-19Implement "insmod -".Elliott Hughes
Also use finit_module if available. Given that "insmod -" requires init_module, maybe this isn't a worthwhile optimization. Given that "insmod /actual/file.ko" is the common use case, maybe it is. Fix a bug in readfileat where *plen would be corrupted if you didn't supply your own buffer (because ibuf is 0 in that case, not a pointer to the start of the allocated space).
2016-02-19Help text update from Isaac Dunham, tweaked slightly.Rob Landley
2016-02-19Add xxd -p and -r.Elliott Hughes
SELinux denials include hex-encoded paths in the log messages; xxd -r -p is a convenient way to decode them. The heuristics are a little weird to my mind, but match the documentation and observed behavior.
2016-02-10use unsigned long with factorizabera
2016-01-31Fix blkid typo (label wasn't detected in murderfs).Rob Landley
2016-01-27long opts and -f for unshareizabera
2016-01-17Extend utf8 fontmetrics so ps can use them.Rob Landley
Also, I forgot to check in uuid_show() last time.
2016-01-17Add -L label and UUID support to mkswap.Rob Landley
2016-01-17Update draw_str() and friends to do standard escaping for ^X <AB> U+ABCD.Rob Landley
2016-01-16Add swapon -d (discard)Rob Landley
2016-01-10Make cursor left/right change sort type in iotop.Rob Landley
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.
2015-12-29Add strafter() to lib.Rob Landley
2015-12-27Add scan_key_getsize() doing the ANSI probe, switch scan_key() to TAGGED_ARRAY,Rob Landley
and add test_scankey.
2015-12-23Factor out draw_str() and friends.Rob Landley
2015-12-06Add free -h, based on a patch from Isabella Parakiss.Rob Landley
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-11-03Whitespace and parentheses.Rob Landley
2015-11-02Explain signals in oneit help text.Rob Landley
2015-10-27Replace xcount_cpus() with a call to sysconf(_SC_NPROCESSORS_CONF)Rob Landley
2015-10-25Add xcount_cpus()Rob Landley
2015-10-20Move d/h units from %d %D output to default format string.Rob Landley
2015-10-10"stat -c %T" support (filesystem type names) based on patch from Hyejin Kim.Rob Landley
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-09-29help_exit() tweak.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-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-17Fix a couple things gcc is too dumb to figure out on its own.Rob Landley
2015-09-11Replace toys.exithelp with help_exit() in lib.Rob Landley
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-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-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.
2015-08-14Fix ionice default class.Elliott Hughes
2015-08-08First pass at proper bunzip2 command line handling.Rob Landley
2015-08-08login: execl() requires a path, not a file nameIsaac Dunham
2015-08-08Fix switch_root implementation.Alistair Strachan
Add the MS_MOVE of cwd to / and chroot into it. chdir is also called to ensure cwd does not point outside the chroot. The switch_root toy was also blocking any case where NEW_ROOT/init did not exist, even though NEW_INIT was a required parameter and did not have to be '/init'. Change it to handle any NEW_INIT passed as either a relative or absolute path. With this change, the switch_root toy actually works from initramfs.