Age | Commit message (Collapse) | Author |
|
The test shouldn't assume there's a toybox binary on the path.
|
|
|
|
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.
|
|
Also try to only kill processes we created.
|
|
Parsing file(1) output isn't a good way to determine file system type anyway.
|
|
Also make the cleanup kill more focused.
|
|
Also use a much stricter regex in the regex test to avoid killing innocent
bystanders.
|
|
|
|
check in two converted commands.
|
|
|
|
|
|
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.
|
|
(or April 31 in any year). Some normalization allowed, exclusions are just
what http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html says.
|
|
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);
^~~~~~~~~~~~~
|
|
so throw them in the "requests" category so they show up in status.html.
|
|
|
|
|
|
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.)
|
|
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.
|
|
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.)
|
|
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.)
|
|
(It was defaulting to 99999 but not FLAG_w, so it tried to _pad_ to 99999.)
|