Age | Commit message (Collapse) | Author |
|
|
|
(And, for some reason, timezone. Individual files have timezones?)
|
|
|
|
|
|
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.)
|
|
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.
|
|
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).
|
|
|
|
|
|
(Recent "show + for last char when truncated" change broke that, putting it
back.)
|
|
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.
|
|
(It was defaulting to 99999 but not FLAG_w, so it tried to _pad_ to 99999.)
|
|
|
|
|
|
(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.)
|
|
just for terminal width.
|
|
|
|
|
|
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
|
|
commandline tool fails to sort by the 3rd,4th,etc column. For example: when you exec
$ sort -t',' -k 3n
on a file which cotains:
1,2,3,4
2,3,4,1
4,1,2,3
3,4,1,2
you got:
4,1,2,3
1,2,3,4
2,3,4,1
3,4,1,2
but the expected output should be:
3,4,1,2
4,1,2,3
1,2,3,4
2,3,4,1
The bug is due to the dependency of "isspace(str[end])" at line 113.
When searching for the non-space key_separator, the search stopped just at the position of first key_separator it met.
The bug can be easily fixed by adding "end++" when the search have found one separator and exit the for loop.
|
|
because there's no -asec or -ahour.)
|
|
|
|
|
|
line aren't filtered out. Audited all the callers and removed redundant
calls, adjusted call sequence, etc. (And let rm _not_ do this, because posix.)
|
|
|
|
|
|
This fixes an indirect function call through a pointer of an
incompatible type.
See http://clang.llvm.org/docs/ControlFlowIntegrity.html for more
details.
|
|
|
|
|
|
reliably be distinguished by checking length, because %H amd %m and such
can match different numbers of digits.)
|
|
T to be a space instead (because the posix says so, no idea why), initialize
default values reliably including zeroing daylight savings time field (which is
handled inconsistently by libc and just screws stuff up).
|
|
It's causing confusion, and it's not obvious that anyone's relying on
it (and even if they are, let's try to find and fix them first).
|
|
|
|
|
|
(no /proc/$PID/cmdline so setting was skipped and previous value retained),
which led to memcpy() with an overlapping source/dest range (annoying asan).
Fix: move temp variable and assignment outside the if() statement so we assign
zero if we can''t read the file.
|
|
(1<<32 blocks * 512 bytes, done with unsigned 64 bit math).
|
|
Say "toybox" before version string. Tweak sed to preserve lie-to-autoconf.
|