Age | Commit message (Collapse) | Author |
|
And won't work anyway because we don't have crypt(3).
|
|
|
|
(And, for some reason, timezone. Individual files have timezones?)
|
|
|
|
|
|
The argument to help_exit is a char*, not a FILE*.
|
|
utimensat takes atime in [0] and mtime in [1], but since we're overwriting
with UTIME_OMIT, we actually want to flip the comparison so -a blats 1 and
-m blats 0.
|
|
busybox uudecode supports this, and POSIX explicitly mentions it (albeit
only in the "STDOUT" section). Plus Android doesn't have /dev/stdout and
/dev/stdin, so this lets us rewrite the uudecode tests so they pass on
Android too.
|
|
While we're at it, ls -m wordwrap was one column early.
|
|
|
|
isn't obviously useful.)
|
|
Also refactor so that legacy mode gets all the new functionality too, and
add -S to make it easier to test legacy mode on 3.5 or newer kernels (at least
on the host; on Android the syslog(2) system call is no longer allowed).
Bug: http://b/36090178
|
|
not to have it, and implementing our own means a pattern like
"Time %%%s%%" is expensive to handle the corner cases of.
|
|
with range checks for seconds, minutes, hours, day of month, and month.
|
|
`ps -A | cat` shouldn't have different output depending on the size of
your terminal window.
|
|
Fixes:
toys/android/getprop.c:56:39: warning: incompatible pointer types
passing 'void (void *, const char *, const char *)' to parameter of
type 'void (*)(void *, const char *, const char *, uint32_t)'
(aka 'void (*)(void *, const char *, const char *, unsigned int)')
[-Wincompatible-pointer-types]
__system_property_read_callback(pi, read_callback, NULL);
^~~~~~~~~~~~~
|
|
Also add trivial tests.
|
|
exist, which can hit ps when /proc isn't there or /proc/$PID/task isn't
there (because process exited between the time we checked its contents
and the time we looked for its threads).
|
|
|
|
and make uptime use it.
|
|
|
|
(Recent "show + for last char when truncated" change broke that, putting it
back.)
|
|
to unify the two codepaths in Elliott's rewrite.
|
|
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...)
|
|
|
|
If we can read and write bzip2 files, we should be able to identify them
too...
|
|
|
|
|
|
|
|
to be left justified again.
|
|
|
|
when we can't query terminal size pad to 80 but add -w.
|
|
(Broken out of a larger patch, fixed the other part a different way.)
|
|
(It was defaulting to 99999 but not FLAG_w, so it tried to _pad_ to 99999.)
|
|
__attribute__((returns_twice)) instead of noinline.
Yes LLVM supports it: https://llvm.org/bugs/show_bug.cgi?id=6287
|
|
|
|
|
|
(left-justified) fields.
|
|
subtract one _less_ than /dev prefix length or string isn't terminated.
|
|
|
|
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.)
|
|
from incrementing by a double.
|
|
just for terminal width.
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
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
|
|
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
|