Age | Commit message (Collapse) | Author |
|
sizeof(int) != sizeof(size_t) for LP64, leading to hilarity^Wcrashes.
|
|
The "lsm" portability stuff could abstract this away, but Android doesn't
need it, and getprop is meaningless on non-Android. (And if you're just
building with the NDK, on recent enough versions of Android you won't be
able to read most of the system properties anyway because access to them is
increasingly restricted by selinux.)
|
|
Removes the dependency on libcutils for everything except ps.
|
|
A "globally unique 32 bit number" is a concept the Linux world has outgrown.
|
|
|
|
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.
|
|
Kernel can handle 64k maximum segment size.
|
|
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.)
|
|
screwed up "tar c" to stdout.
|
|
|
|
|
|
This fixes an indirect function call through a pointer of an
incompatible type.
See http://clang.llvm.org/docs/ControlFlowIntegrity.html for more
details.
|
|
Annoyingly, this means writing a new dmesg implementation that uses /dev/kmsg
rather than the klogctl system call. Worse, pre-3.5 kernels don't support
that, so we need to keep the old implementation around as long as we still
care about those kernels.
Since I'm here, add the fancy colors from modern dmesg and the -C flag.
Tested on Nexus 9's 3.10 kernel, an Ubuntu 3.13 kernel, and the
Nexus One's 2.6.35 kernel.
|
|
|
|
Also improve error reporting.
|
|
Bug: http://b/32371104
|
|
|
|
|
|
|
|
without getfattr, so I'm putting it back in pending for now.
|
|
|
|
|
|
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.
|
|
POSIX says nothing, but traditional ps lets you say "ps 123" in addition
to "ps -p 123". (You can mix and match too: "ps -p 123,124 666 667" works
fine.)
Bug: 31778761
|
|
Android uses NAME rather than CMD by default, but that's not what we
want with -T. Noticed because it broke systrace's reporting of thread
names (see https://developer.android.com/studio/profile/systrace.html).
Bug: 31741954
|
|
|
|
|
|
The recent refactoring broke ls -lh by multiplying all sizes by 0
rather than 1.
|
|
|
|
On a toybox system, most of your bin directory is symbolic links.
Bug: http://b/31294746
|
|
then reading from stdin if it detected a file). Fixed it so "-" always
means stdin and you have to say ./- to look at a local "-".
Did some whitespace tweaks while I was there...
|
|
Or more accurately, s@[[:space:]@]@replace@ which can't treat the @ in
[] as a delimiter but has to know about nested [[]] to make that decision.
|
|
|
|
|
|
|
|
(Two spaces padding between columns, and -k is hardwired on.)
|
|
(We should use xprintf and similar to flush and check if stdout went away
once per line. No point flushing partway through a line, so in ls only use it
on things outputting a newline char.)
|