Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
(A git build takes it from "git describe".)
|
|
|
|
|
|
|
|
Broke the bionic build:
external/toybox/toys/net/netcat.c:188:37: error: incompatible pointer types assigning to 'sigjmp_buf *' (aka 'long (*)[33]') from 'jmp_buf *' (aka 'long (*)[32]') [-Werror,-Wincompatible-pointer-types]
if (toys.optflags&FLAG_L) NOEXIT(child = XVFORK());
^~~~~~~~~~~~~~~~~~~~~~~~
external/toybox/lib/lib.h:375:19: note: expanded from macro 'NOEXIT'
#define NOEXIT(x) WOULD_EXIT(_noexit_res, x)
^~~~~~~~~~~~~~~~~~~~~~~~~~
external/toybox/lib/lib.h:367:16: note: expanded from macro 'WOULD_EXIT'
toys.rebound = &_noexit; \
^ ~~~~~~~~
1 error generated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.)
|
|
This lets you have struct arrays with a string as the first member, ala:
struct {char *name; int x, y} blah thingy[] = TAGGED_ARRAY(BLAH,
{"one", 1, 2}, {"two", 3, 4}, {"three", 5, 6}
);
And it produces #defines for the array index of each, ala:
#define BLAH_one 0
#define BLAH_two 1
#define BLAH_three 2
So you can use thingy[BLAH_two].x and still reorder the elements at will.
Note: if you screw up the array initializers, temporarily replace
TAGGED_ARRAY(BLAH, with { and the ); with }; and the compiler will give you
better error messages. (With the macro the compiler reports errors on the
TAGGED_ARRAY line, not where the comma is missing in its contents.)
Currently the TAGGED_ARRAY( and ); must be on their own lines, and the
{ and start of each attached string must be on the same line.
|
|
and slot numers into a structure. (Keeping multiple arrays in sync may have
been efficient but it was ugly.) Fix duplicate command name copying that
corrupted the name of kernel threads. Tighten up slot[] docs.
|
|
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.
|
|
Adds XVFORK() macro, teaches xpopen_both() to call /proc/self/exe with NULL
argv (and converts cpio -p to use that), adds TOYBOX_FORK guards to some
unconverted commands.
|
|
|
|
|
|
make lib/lsm.h auto-include from toys.h.
|
|
|
|
|
|
macros for a disabled command (needed when multiple commands share infrastructure with a common set of flags).
This means the flag space is no longer packed, but leaves gaps where the zeroes
go. (Actual flag bit positions are the same for all configs.) Since the
option parsing needs to know where the holes are, the OPTSTR values are
now generated as part of flags.h with ascii 1 values for the disabled values.
(So generated/oldflags.h went away.)
This also means that the option string argument for OLDTOY() went away, it now
uses the same arguments as the NEWTOY() it references.
|
|
random other symbol name (because gnu) and this screws up nontrivial macro expansions of NEWTOY(basename), so work around it in portability.h.
|
|
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.
|
|
|
|
OLDTOY standalone (if it has its own config symbol).
|
|
permissions, 2) shouldn't recurse forever without exec, stack depth increases and we may leak other resources. Limit it to ~5 levels.
|
|
bytes, so we can't globally enable locale without opening stack/heap smashing vulnerabilities. Make commands individually request setlocale() using TOYFLAGS instead.
|
|
toys.signalfd if set.
|
|
toy_init() doesn't zero the rest of the struct.
|
|
Move <fnmatch.h> to toys.h, since it's POSIX.
Avoid duplicating code in an if/else block.
Terser error messages, spelling.
Don't always print the state.
|
|
networking). Move headers standards ignore (but which have been there >15 years) to lib/portability.h. Fold xregcomp into lib since it's posix.
|
|
|
|
options isn't very interesting anymore.
|
|
This should actually generate FLAG_longopt 0 #defines for disabled bare
longopts (ala ls without --color). Put temporary executables under "generated"
(including instlist for install).
|
|
readfile() semantics to be able to read into an existing buffer, or malloc its own if that's NULL.
|
|
* make help message more like others
* s/TT\.(.)Argu/TT.\1/g
* move environ to toys.h
* simplify failure messages
* clear password before quit
* not check what execve returns
* -lc
|
|
|
|
was still cleaning busybox-isms out of my head...
|
|
support pending.
|
|
|
|
Teach make.sh to emit "#define FLAG_x 0" for options inside disabled USE macros so we can unconditionally refer to them.
|
|
|
|
|
|
right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style.
The actual code should be the same afterward, this is just cosmetic refactoring.
|
|
implementing it and some test cases for it. The test cases are only for UTF-8 locales.
|