aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-03FAQ tweak: one more link on toybox history.Rob Landley
2017-03-03Check in web page announcement for 0.7.3.Rob Landley
2017-02-21It's past time for 0.7.3.0.7.3Rob Landley
2017-02-20If the last ps field is left justified, it extends to the width of the screen.Rob Landley
(Recent "show + for last char when truncated" change broke that, putting it back.)
2017-02-204a4b3d65644ce403b0f22887fc0d38b0202ec8c7 upset clang.Elliott Hughes
Recent-ish clang doesn't like self-assignment. Google/Android code always uses the [template-based moral equivalent of] __attribute__((__unused__)) to keep both compilers happy.
2017-02-20Declaring todo bankruptcy, dmesg goes back into pending until I get a chanceRob Landley
to unify the two codepaths in Elliott's rewrite.
2017-02-20Fix dmesg -c and -C.Elliott Hughes
I never use these, so I didn't notice I'd broken them until someone who does bringup complained. The "one weird trick" with SEEK_DATA is documented at the URL we already point to. SEEK_DATA was added in Linux 3.1 (2011) and isn't available in glibc 2.19 (2014), so I've added that to "portability.h" for the benefit of Ubuntu 14.04. Also make -c and -C mutually exclusive. Also fix some of the formatting I introduced earlier. (A clang-format file would help prevent these mistakes...)
2017-02-18Ascii only showed 15 rows instead of 16 and spacing was wrong for 96-100.Rob Landley
2017-02-17Fix the comment about the Android SIGPIPE behavior.Elliott Hughes
2017-02-16Teach file(1) about bzip2 files.Elliott Hughes
If we can read and write bzip2 files, we should be able to identify them too...
2017-02-10Add back bionic SIGPIPE handler workaround accidentally removed in 3b51a07e478dRob Landley
2017-02-09Document df -aRob Landley
2017-02-07Add ascii: display ascii table.Rob Landley
2017-02-06ps -l has 4 chars left for "cmd", switch "ADDR" to "BIT" to save space.Rob Landley
2017-02-06Make tty size failure to enable -w (Elliott prefers that), and fix last fieldRob Landley
to be left justified again.
2017-02-05Don't set SIGWINCH when reading ANSI size probe data, it causes a loop.Rob Landley
2017-02-05Bugfix: last field was padding to width with trailing spaces (oops), andRob Landley
when we can't query terminal size pad to 80 but add -w.
2017-02-05Patch from Elliott to silence a "const" warning in android/getprop.c.Rob Landley
(Broken out of a larger patch, fixed the other part a different way.)
2017-02-05Silence a warning.Rob Landley
Once upon a time you could call fchown() and let it fail. Then gcc decided not using its return code was inconcievable, but you could typecast it to (void) to shut it up. Then gcc noticed people doing that and clutched its pearls and took it away, so I added an if() statement that does nothing with the result because we _expect_ this to fail when we're not root. Then clang started complaining about an if (); statement with the semicolon on the same line, but decided it's ok if the ; is on the next line (I.E. significant whitespace in C), so I'm adding an "assignemnt to self" that gets optimized away so it does a more _explicit_ nothing (the same way you suppress gcc's broken "this isn't used uninitialized" warnings). If the compilers weren't going to so much trouble to force the issue I might add code to only call fchown when we're UID 0, but I refuse to be coerced into it. (And if getpid() is still a system call instead of a vdso member then it doesn't actually _save_ us anything, the dentry should be hot and the permission check was just "if (!uid)" before selinux entered into it and we're operating on an fd so the security's the same.)
2017-02-05Default to width 80 when tty size probe fails (ala serial console).Rob Landley
(It was defaulting to 99999 but not FLAG_w, so it tried to _pad_ to 99999.)
2017-02-04Posix says stdio.h should define 'stdout' as a macro, and bionic turns it intoRob Landley
an array index, which doesn't work as a local variable name. So rename it.
2017-02-04Switch oneit to use xopen_stdio() for -c (oops) and switch XVFORK() to useRob Landley
__attribute__((returns_twice)) instead of noinline. Yes LLVM supports it: https://llvm.org/bugs/show_bug.cgi?id=6287
2017-02-03Fix typo in pgrep help.Elliott Hughes
2017-02-03Fix operator precedence error in df.Elliott Hughes
2017-02-01Build dependency tweak.Rob Landley
2017-02-01Extend default USER length to 12 and output "+" as last character of truncatedRob Landley
(left-justified) fields.
2017-01-31ps bugfix: len of TTY field doesn't include null terminator, so memmove shouldRob Landley
subtract one _less_ than /dev prefix length or string isn't terminated.
2017-01-30Cleanup leftover debris.Rob Landley
2017-01-30Improve file's ELF parsing.Elliott Hughes
An ELF file with no program headers is valid, and binutils leaves e_phentsize zero in that case. Fix the corruption check to cope. Also, since notes are in both the program and section headers (and I'm not aware of the possibility of having no sections but still having notes --- where would they be?), look for them in the section headers instead. Also extend the parsing of the .android.note.ident ELF note to include the NDK version information if present. (This won't be present for platform binaries, but will be present for NDK-built binaries such as app libraries.)
2017-01-29Izabera suggested seq should multiply to avoid accumulating rounding errorsRob Landley
from incrementing by a double.
2017-01-28Tweak -w help text to clarify that it prevents truncating _any_ fields, notRob Landley
just for terminal width.
2017-01-28Fix padto in draw_trim_esc() so it behaves like printf %*.*s and matches theRob Landley
comment (I.E. negative first value _left_ justifies). This makes ps display the same truncated values with and without a tty. Also add a few comments to the rest of the file.
2017-01-28Add missing `static`s and remove an unused function.Elliott Hughes
2017-01-28Whitespace.Rob Landley
2017-01-28modprobe: Small cleanup pass, described on the list.Rob Landley
2017-01-28modprobe: use finit_module when possibleSteve Muckle
The finit_module() system call, introduced in Linux 3.8, reads the module from a supplied file descriptor. This allows the kernel to do security checks based on the file's location.
2017-01-28modprobe: add -d option to specify module directory path(s)Steve Muckle
While most systems have their kernel modules, modules.dep etc located at /lib/modules/`uname -r` this is not always the case. The -d option may be used to specify a nonstandard path for these files. It may be used more than once to specify multiple directories where these files may be found.
2017-01-28top -H is more useful if it shows thread names.Elliott Hughes
I knew that just showing the process name was a divergence from traditional Android behavior, but I was curious to see whether anyone cared. Bug reports show that they do. I've not made this conditional on CFG_TOYBOX_ON_ANDROID on the assumption that this is more useful for everyone else too. (Why are you asking for per-thread information if you don't actually want to be able to identify individual threads?) Why not _just_ show the thread name? Because on Android at least, every process has lots of identically-named threads; everyone has GC threads, everyone has JIT threads, and so knowing _just_ the thread name is rarely useful. Why show thread name first? Because the kernel limits thread names to 15 bytes plus a NUL, so any left-over space should go to the process name, so that should come last. Why call the thread name THREAD? Because "CMD" isn't obviously "thread name" to folks who don't know how this is implemented behind the scenes. This change also removes an incorrect "usage:" comment. None of the other commands in this file duplicated their "usage:" lines, and this copy wasn't even close to being correct. Bug: http://b/34610082
2017-01-28Minor Android roadmap update.Elliott Hughes
2017-01-28Remove s6 from roadmap. (It wasn't in status.html anyway, haven't updatedRob Landley
our comparison in years, and email with the maintainer convinced me it's not a good yardstick for "what a traditional linux system expects to have".)
2017-01-28Answer another question.Rob Landley
2017-01-25Remove name length limit for system propertiesDimitry Ivanov
Android O removes name length limit for system properties. Use __system_property_read_callback instead of deprecated __system_property_read in getprop and remove check for property name length in setprop. Test: adb shell setprop debug.test.very.very.long.property.name valueforpropertywithlongname Test: adb shell getprop | grep debug.test.very.very.long.property.name Bug: http://b/33926793 Change-Id: I57ca99ea33283d069cd1b7b9f110ec9fb27f3d19
2017-01-25Promote microcom to net.Rob Landley
2017-01-25Switch escape charcter to ^] (ascii 29, doesn't conflict with emacs or joe).Rob Landley
Recognize full range of linux serial speeds (only error cfsetspeed returns is invalid speed value).
2017-01-17Fix microcom command-line help and -X.Elliott Hughes
2017-01-14Add "microcom" to pending.Elliott Hughes
Our device bringup folks wanted a simple serial console, both on the host and on the device. This is certainly enough to replace what I've been using personally on the host. I'd never heard of "microcom" until I asked the internets what busybox users use, so I don't care what we call this or what the options are called. (But would like to decide before it gets ossified in a million factory test scripts and the like!) The tool that this replaces for me defaulted to /dev/ttyUSB0, but since I don't know whether that default would be useful for most other people too, I left that out. Command-line history will solve my transition problem.
2017-01-14Quick and dirty fix for CVE-2016-6321 but seriously this is in pendingRob Landley
for a reason and I need to completely rewrite it.
2017-01-09More pending shell tests.Rob Landley
2017-01-04Implicit function declarations are an error, not a warning.Rob Landley
(The switch to 64 bits screwed up varargs: everything used to be promoted to 32 bits, but now it's 32 bits or 64 bits depending on type declarations, so you need the type declarations. Because promoting "char" arguments to 32 bits back when a megabyte was a lot of memory was ok, but promoting everything to 64 bits now that you can get 2 gigabytes of ram in a phone is unacceptable.)
2017-01-04Tweak install_airlock help text.Rob Landley