The toolbox -t option is really the standard -H option. Add -H so
I can switch dumpstate over.
We should also flush after each run so we don't arbitrarily truncate
at the stdio buffer size. (I'm pretty sure no one uses toolbox top
interactively, but it annoyed me while testing -H.)
Change-Id: Ib87cb541d1b21c48468614b2ef60b0cc62694c95
This is another step towards being able to swap toolbox ps out for
a more complete ps. This should also let us fix dumpstate to not
need a separate "ps -Z" run --- we can just add -Z to the previous
run of ps instead.
Change-Id: I0b96dff51988edd2b33879f8c31faccebeeffddd
Regular ps doesn't have this, and at least in our tree everyone
seems to actually pipe to grep instead of using this anyway. But
since the switch to a more full-featured ps is going to be a nightmare
anyway, let's dip a toe in the water by removing something we don't plan
on supporting.
Change-Id: Id220ae0cfdad8368341730f643a2bfbaad3c9716
Since watchprops would have to be rewritten anyway in the upcoming properties
rewrite, there seems little point in rewriting it for toybox first. Let's
see how many people actually use watchprops and decide whether it's worth
the effort...
Change-Id: I996e7209bc81633ee66602f09f130226336d9987
None of our tools -- except for top, which I'd fixed previously --
handles SIGPIE correctly. Let's just handle SIGPIPE in the driver.
Bug: https://code.google.com/p/android/issues/detail?id=157920
Change-Id: I322ea411f53c71585a64118c217d54389f675d4e
Also remove the unused generality, and remove a dependency on a linux/
header file when there's a sys/ one that's even better.
Change-Id: If07608cc9ae2b7c2928ee2a9e33d20d63a9a8f45
ioctl_nr is passed signed to the kernel, but many users refer
to ioctl's in unsigned 32 bit notation.
Let's use stroll to set it, to let people specify either
negative numbers or large positive numbers.
Also improve error reporting.
Reported-By: Alex Piliev <ktnr74@motorola.com>
Change-Id: I789434895b70b051d4d5c1a5db566a1925478ef0
Our uptime is very different from the regular one, and usefully so, so
this code will live on. Remove dead bits.
Also fix the annoying "1 days" bug while I'm here.
Change-Id: Ied5403ba96dcc5eddd4d386b59c6fcdea3209881
It's basically "echo" with a redirect, and it hasn't been touched since
cupcake. Could be replaced with a shell script if need be.
Change-Id: I75b663ea4be3d7cd9581faa6ef3979de28e68dfb
These were leftovers from the SELinux boolean support that
was originally merged. Since Android prohibits SELinux policy
booleans, we can just drop it.
Change-Id: I02f646a7d8db65e153702205b082b87a73f60d73
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
It hasn't worked in some time (it removes /data/dalvik-cache, which is
required by art), and if you're prepared to reboot (to let init put back
all the directories a working system needs) there are other ways to wipe
data (such as "fastboot format userdata reboot").
Bug: 19644330
Change-Id: Ib074ea21cc28409a506d66d75060bb4ad85539e2
Also move the dd-only library code into the dd section (so a future
maintainer will know to keep/remove them as a block) and fix the one
build warning remaining.
Change-Id: Ibf6b28ef05e4cbb70b9308b0f4387f5af5b7fa94