Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
"cat /proc/self/exe && cmp /proc/self/exe" won't see the same file if cat
and cmp aren't both in a toybox multiplexer binary, so snapshot and pick one.
|
|
|
|
|
|
|
|
|
|
1) Don't try to force re-exec unless we actually dropped permissions.
(Fixes "./toybox mount" when no suid bit on toybox binary, which
previously exited.)
2) Set temporary toys.which value for error reporting.
(Fixes "ln -s toybox mount && ./mount" with CFG_TOYBOX_DEBUG and
no suid bit, which previously segfaulted.)
|
|
|
|
|
|
|
|
down move way down past end of list.
|
|
|
|
|
|
Still need to do the cpu(s) line in top.
|
|
(Still truncates at the right edge to fit terminal width, but last commit
made -w the default when no terminal width detected.)
|
|
when we haven't got a terminal width. Replace top CMDLINE with ARGS.
More ps infrastructure genericization: parse reverse unconditionally.
Break out get_headers() with global references moved to caller.
change quick_ko() to default_ko() (dlist_terminate is now caller's job).
|
|
None of the current callers' callbacks set errno, so this was resulting in
bogus errors like "No device or address" when ps tried to complain about a
misspelled field.
|
|
If we're fixing warnings in pending...
|
|
the start of -h HEADER (mostly parses text, but doesn't display %ESCAPES yet).
Added UP, DOWN, and R keys.
Made only iotop STAYROOT (not top), added comment explaining why.
Bumped iotop's historical -O and -K to capital letters.
Added quick_ko() to add argument list from string instead of arg_list.
|
|
|
|
Make fallback sort do string sort after numeric tie, retain absolute uptime
even though relative is needed for %CPU (hence utime2).
|
|
- Adjust to 80 columns
- remove a useless function(strchr_nul), variable, type casting and
compile warnings(fgets)
- clean up netstat command option condition
- change useless double pointer to single point and dynamic memory
allocation to static one
- fix a ambiguous return type and typo
|
|
|
|
|
|
While I'm there, pack the ps help text, break out TOP_COMMON (todo: update
config2help to collate that properly), add -o CPU showing which processor
this pid is running on, implement -o C (it's %cpu without the fractional
part), add -o %MEM, fix header padding.
|
|
|
|
|
|
|
|
Still need to do -n and -o.
|
|
|
|
Also, I forgot to check in uuid_show() last time.
|
|
|
|
|
|
|
|
|
|
(because ls uses nonstandard directory recursion which collates all the
command line arguments under a fake top node, which needs more thorough
initialization).
|
|
|
|
|
|
|
|
Needs testing and a few more options connected up.
|
|
I dunno if find -execdir should show depth-first like it's doing, bit given
that ubuntu's treating "+" and ";" the same for execdir... eh?
Also, testing "find toys tests -mindepth 2 -execdir echo {} +" against
the toybox source is easy (and why if (revert) fchdir() is needed), but
adding that to the test suite means making a nontrivial hierarchy of files
to test against (don't wanna use the project source because it's expected
to change in ways that would break the tests)... The old "real world data
vs test data" problem.
|
|
|
|
Exit immediately if we don't actually have anything to -f --- it's -f's
big brother -F that retries by name rather than by fd.
|
|
You can't pass a NULL value to setenv(3). The "put things back how they were"
intent of this code is best achieved by calling unsetenv(3) in the NULL case.
(This causes a crash with "hwclock -u" on Android. glibc silently corrupts the
environment instead.)
|
|
Some things are worse when you remove the 'p'.
|
|
|
|
Commit 4b4ab6a50998 broke loopfiles' handling of "-".
This broke the existing cat tests, so no new test is necessary here.
|
|
|