aboutsummaryrefslogtreecommitdiff
path: root/toys
AgeCommit message (Collapse)Author
2013-10-31Patch from William Haddon to make xargs with blank input call its command ↵Rob Landley
line once. (Tweaked slightly for whitespace and to collate variable declarations.)
2013-10-31Make the patch -x option (only enabled with CONFIG_DEBUG) provide more ↵Rob Landley
information about why a patch didn't apply. (Offset of first nonmatching character at each line during seek phase.)
2013-10-27Promote nl from pending to posix, and add tests.Rob Landley
2013-10-27Cleanup nl, add support for more bits of posix.Rob Landley
2013-10-27Here's a revised cpio.Isaac Dunham
I've reduced the use of malloc(), dropped an extra function call, and -at least in theory- allowed proper handling of non-regular files. (If we have a file we can't read, we still should record it when it's of a type where file content is ignored).
2013-10-13watch: Add support for -e option, remove memory leak and deal with not-wide ↵Elie De Brauwer
terminals
2013-10-26I noticed the user count was missing and added this, borrowing a bit of code ↵Jeroen van Rijn
from toys/posix/who.c.
2013-10-17Minor cleanup of rebootRob Landley
2013-10-01New toy: reboot/halt/poweroffElie De Brauwer
2013-10-16useradd, groupadd, and mkpasswd submitted by Ashwini Sharma.Rob Landley
2013-10-16Prep work for useradd by Ashwini Sharma.Rob Landley
2013-10-14I've finally gotten 'cpio' into a shape where it could be useable.Isaac Dunham
This version can archive and extract directories, sockets, FIFOs, devices, symlinks, and regular files. Supported options are -iot, -H FMT (which is a dummy right now). It only writes newc, and could read newc or newcrc. This does NOT implement -d, which essentially is equivalent to mkdir -p $(dirname $FILE) for every file that needs it. Hard links are not supported, though it would be easy to add them given a hash table or something like that. I also have not implemented the "<n> blocks" output on stderr. If desired, I can add it pretty simply. There is one assumption this makes: that the mode of a file, as mode_t, is bitwise equivalent to the mode as defined for the cpio format. This is true of Linux, but is not mandated by POSIX. If it is compiled for a system where that is false, the archives will not be portable.
2013-10-08Move blkid out of pending, default y.Rob Landley
2013-10-08Cleanup chvtRob Landley
2013-10-08Cleanup blkidRob Landley
2013-10-07blkid cleanup: more whitespace (including fixing a strange unindented if ↵Rob Landley
block), convert strange fstype inclusion to OLDTOY(), use "<1" arg so calling with no arguments doesn't hang, convert typedef to normal struct.
2013-10-07blkid cleanup: Convert tabs to spaces.Rob Landley
2013-10-07Add blkid.cBrad Conroy
I finally figured out the NTFS labels after reading a rant on how UTF-8 rocks and how MS switched to UTF16 or UCS1 or whatever. The reason I couldn't grep for the label (mine was "myntfs") was that it is stored as "m\0y\0n\0t\0f\0s\0\0" - found another good use for hexdump :) Notes: I only have x86 to test on, so there are a couple of places that may need bswap_{16,32} for endianness. I used a 65k buf instead of toybuf (4k) for simplicity, but tried to organize it for toybuf if wanted. I have info on more fs types, to patch with after review. blkid does output for all devices if 0 args -> read /proc/partitions?
2013-10-06top submitted by Ashwini SharmaRob Landley
2013-09-22traceroute from Ashwini SharmaRob Landley
2013-09-21Tweak args (yank old + that never worked, rename | to +), and add uname -o ↵Rob Landley
as a synonym for -s.
2013-09-16Fix -t c0 and -J as reported by heehooman at gmail on the list.Rob Landley
Also fix up help text, and hook up -c.
2013-09-11Ah, that's why commit 1057 was skipped last pull: it was unfinished. Oops. ↵0.4.6Rob Landley
(Fix it.)
2013-09-10First pass of cut cleanup, and make test script slightly happier with the ↵Rob Landley
concept of 80 character lines.
2013-09-09Cleanup on acpi, switch to default y.Rob Landley
2013-09-09I got tired of trying to guess how much terminal time I could get in on my ↵Isaac Dunham
phone, so here's a basic acpi. I could probably add -c fairly easily (print type, cur_state, and max_state) -t is more difficult, since temperatures are reported in at least 1000 * degrees F and 10 * degrees C.
2013-09-09Minor cleanups.Rob Landley
2013-09-09Don't write a zero past end of toybuf with large -d value.Rob Landley
2013-09-09Minor cosmetic tweaks to expand.Rob Landley
Working my way through the to-review list that predates the "pending" directory. This gets expand off my to-review list. (Proof that "need to review" doesn't mean it's in bad shape, this command was fine. Changed capitalization in the help text because I'm trying to have "user supplies this value" be all caps, switched a read() to readall() although I'm not sure modern kernels actually allow -EINTR to generate zero length reads anymore, and since most of the loopfiles() target functions are called do_commandname() changed the name to that just so it's regular. None of the changes are actually important. :)
2013-09-09Adjust patch to use dlist_pop()Rob Landley
2013-09-09Redo tail closer to the original design. Add more tests for large data sets. ↵Rob Landley
(Still no -f support yet.)
2013-09-03Replace ↵Rob Landley
for_each_pid_with_name_in_array_perform_callback_function_upon_translated_value() with name_to_pid(), comparing absolute paths or just basename() consistently as spotted by Lukasz Skalski, and adjust callers.
2013-09-06Ashwini Sharma submitted route.c, adding it to pending.Rob Landley
2013-09-06Missing typecast in recent rm fix. Oops.Rob Landley
2013-08-30uname: Fix help stringElie De Brauwer
2013-09-05env - there were 2 segfaults when run on my Ubuntu 12.04 machine:Jacek Bukarewicz
- one is because eglibc sets environ to NULL on clearenv(). I added check for environ being not NULL when iterating over environment variables - switched xexec to xexec_optargs because command argument is a pointer to optarg which is freed by xexec.
2013-09-05Make chdir handle permissions according to posix, reported by Jacek Bukarewicz..Rob Landley
2013-09-05fix rm to handle "mkdir sub/sub && chmod 007 sub/sub && rm -rf sub".Rob Landley
Previous version didn't delete it, but exited without error. Neither was right.
2013-09-04Don't pad stat's %a field.Rob Landley
2013-09-04First pass at umount, not quite done yet.Rob Landley
2013-09-03Introduce libbuf analogous to toybuf but for use by lib/*.c. Change ↵Rob Landley
readfile() semantics to be able to read into an existing buffer, or malloc its own if that's NULL.
2013-09-03Remove itoa/utoa, let libc do this with sprintf.Rob Landley
2013-09-03Convert dhcp/dhcpd from utoa() to sprintf().Rob Landley
2013-09-02Switch ls from utoa to sprintf.Rob Landley
2013-09-02Cleanup pwdxRob Landley
2013-09-02pwdx by Lukasz Skalski.Rob Landley
2013-09-01Implement ls --color=auto, suggested by Rich Felker.Rob Landley
2013-09-01Improve --longopt parsing: general bugfixes, better error reporting, new ; ↵Rob Landley
option for optional arguments only suppliable with =.
2013-08-31tail: Some fixesFelix Janda
- Rewrite most of the not lseek() logic - Change meaning of len in line_list - Use single instead of double linked list
2013-08-30Allow getmountlist to read fstab too.Rob Landley