Age | Commit message (Collapse) | Author |
|
|
|
More's sigatexit handler needs to distinguish between normal exit and exit
due to receipt of a signal.
Change tty_sigreset to look at the signal number too, so that pressing 'q'
to exit top doesn't cause its exit status to be 128.
|
|
|
|
The ps.c change allows us to start. The interestingtimes.c change allows
us to clean up properly afterwards if you ^C out (which you usually do).
Tested with both ssh and "adb shell" (the latter being where I noticed
the problem).
|
|
|
|
both did it) so use getbasename instead.
|
|
external/toybox/lib/linestack.c:84:5: error: conflicting types for 'crunch_str'
int crunch_str(char **str, int width, FILE *out, char *escmore,
^
external/toybox/lib/lib.h:228:5: note: previous declaration is here
int crunch_str(char **str, int width, FILE *out, char *escmore,
^
I'm not sure whether the interface was intended to be wchar_t or int, but
switching to int is the smaller change...
|
|
(The sigatexit() handler list code now calls the handlers on the normal
exit path, so _exit(1) from the handler is wrong; exit_signal() modifies
toys.exitval if necessary.)
|
|
|
|
|
|
header unconditionally. (This fixes the warning when CP_PRESERVE disabled.)
|
|
handle infinite depth. Fix docs, tweak dirtree_handle_callback() semantics,
remove dirtree_start() and don't export dirtree_handle_callback(), instead
offer dirtree_flagread(). (dirtree_read() is a wrapper around dirtree_flagread
passing 0 for flags.)
|
|
major/minor/makedev, but glibc has vowed to break existing programs
(https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html)
and replace it with _another_ non-standard header (not in posix or lsb),
so let's just add functions to lib/ that do the transform ourselves.
|
|
|
|
|
|
Also use finit_module if available. Given that "insmod -" requires
init_module, maybe this isn't a worthwhile optimization. Given that
"insmod /actual/file.ko" is the common use case, maybe it is.
Fix a bug in readfileat where *plen would be corrupted if you didn't supply
your own buffer (because ibuf is 0 in that case, not a pointer to the start
of the allocated space).
|
|
have noticed yet.
|
|
Unlike the POSIX file(1), there's no magic file here, just hard-coded
common (non-obsolete) file formats. Personally most of my use of file(1)
is as a one-line readelf(1) summarizer, so although I assume a full POSIX
file(1) is out of scope (because just the database would likely be larger
than all the rest of toybox), a subset that only supports in-use file types
actually covers most of the use cases I encounter personally.
Also fix peek_be/peek_le.
|
|
|
|
don't run on is easier), and use HELP_ instead of help_ for macro prefixes
to avoid name collisions (such as help_exit() the function).
|
|
the deeply sad passwd heuristics that don't even check numbers and punctuation.
|
|
This isn't a shell builtin, it uses prlimit to target any pid (without -P
it defaults to $PPID, so acts like historical ulimit by default).
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Also, I forgot to check in uuid_show() last time.
|
|
|
|
|
|
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.
|
|
add function key definitions and shift/ctrl/alt cursor keys.
|
|
checking, and fix up format checking complaints.
Added out(type, value) function to stat to avoid a zillion printf typecasts.
|
|
|
|
|
|
(Oops. Missed a file checkin, build break, my bad.)
|
|
|
|
and add test_scankey.
|
|
|
|
|
|
out.
Keep the low 32 bits of FLAG_x constants as 32 bit numbers so that at least
on little endian platforms it's still normal 32 bit math outside of lib/args.c.
|
|
|
|
Change readfileat() to pass back length of read.
|
|
Also WOULD_EXIT(x, thingy()) to set a variable to 1 or 0 showing whether or
not thingy() tried to exit. I'd love to be able to do "x = NOEXIT(thingy());"
but haven't figured out a syntax to make that work yet...
|