Age | Commit message (Collapse) | Author |
|
Android is missing all of these; we need to probe for some so we have
a config symbol to depend on.
sethostname() is easily replaced.
We got termios.h via pty.h; now it's not included in configure-step tools,
so we need termios.h to generate globals.
|
|
Once we've read through the initial TT.bytes backlog we discard the extra data,
meaning we adjust the remaining amount each time so the overflow is zero bytes.
We were doing the adjustment right, but not zeroing out the overflow counter
after we did so.
|
|
symlink following.
|
|
without -H or -L (just like ls -l).
|
|
|
|
Suggested by Ashwini Sharma, I wound up implementing it by creating the new
link at a temporary name and renaming it over the old one instead of renaming
the old file out of the way and putting it back if it failed.
(Because "mkdir -p one/one/blah && ln -sf /bin/one one" would otherwise
rename one/one out of the way and only notice it can't delete it way at the
end when recovery's darn awkward, vs create new thing and if rename fails
(including EISDIR) that's the main error path. And yes the temporary name
is in the same directory as the destination so we never rename between mounts.)
link over the old one instead of renaming the old file and renaming it back.
|
|
|
|
|
|
|
|
|
|
|
|
analysis, plus occasional tweak by me while reviewing them.
|
|
We xstrdup() an optargs string to avoid modifying our environment space
(because it can change what "ps" shows to other processes), and then parse
out colon delimited strings and save them in globals that can later be used
in the -v codepath and so on. But those globals _aren't_ strdup (no point)
which means we can't free the string while we're still using pointers into
the middle of it. So move the free to the end.
(I hardly ever test with CFG_TOYBOX_FREE switched on because even nommu
doesn't need it.)
|
|
for libc, so we have to implement it here.
|
|
|
|
into GLOBALS.
|
|
search.
(Fixes messages about not being able to delete directories when running make test).
|
|
|
|
Cut predates the "pending" directory, so was checked in as-is. Ashwini
Sharma's recent static analysis fixes touched this file, but there's a lot
more to do than the static analyzer found.
|
|
|
|
|
|
we want to redirect both, one, or neither of stdin/stdout.
|
|
"does it exist" test (to avoid errors on rm -f of nonexistent files) said it didn't.
The fix: replace the access() with unlink(), which produces the same "does not
exist" errno and has the added bonus of acting as a fastpath for rm -f on
non-directories. (And since it produces a different error on directories,
falls through to the old behavior there.)
Most of this commit is comment updates explaining being subtle. :)
|
|
|
|
|
|
|
|
command use that.
-F is equivalent to the gnu/dammit flag --we-think-long-options-without-short-options-are-a-good-idea
|
|
|
|
portability.h.patch - it is for O_CLOEXEC, as compiler complained of it.
Makefile.patch - for cleaning generated/*.o files and libopts.dat file
[Fixup to uniq.c from Rob.]
|
|
The fact other implementations don't implement "! -mindepth" doesn't mean we can't. Also, find uses +N, N, -N for everything else but this extension doesn't. Also, -depth already had a definition and this has nothing to do with that. It's a poorly thought-out extension, is what I'm saying.
|
|
|
|
mutually-exclusive options -H and -L shall not be considered an error. The last option specified shall determine the behavior of the utility."
|
|
|
|
|
|
|
|
|
|
|
|
DIRTREE_SYMFOLLOW value, not just true/false).
|
|
|
|
|
|
|
|
|
|
open, and add dir->again variable to distinguish second call instead of checking for -1 filehandle.
|
|
|
|
Use wcwidth() instead of strlen(), and extend the -q substitution to also
whiteout nonprintable characters that are nonparseable utf8 snippets.
|
|
The check for -print vs -print0 was tested before I optimized out the "-" in the strcmps, and I didn't adjust the offset or retest it. (Ooops.)
Also, I wasn't clearing the ! value when descending into parentheticals, so "find . -name blah -o \! \( -stuff -o -thing \)" acted like it had a spurious second ! before -stuff inside the parentheses.
|
|
|
|
|
|
Slight conflict here: this puts killall5 in the posix directory. But the commands sharing code trumps that.
|
|
work.)
|