Age | Commit message (Collapse) | Author |
|
expr now uses the precedence table specified by POSIX, implemented using
the "precedence climbing" algorithm. See the references at the top of
eval_expr().
This fixes 3 of 4 failing tests.
I also added more tests for correct behavior and for syntax errors.
This includes a new test exposing a segfault, related to type coercion.
|
|
(This should fix allyesconfig.)
|
|
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.)
|
|
- shorten error messages
- replace mk_rq with sprintf
- remove struct and defines
- change unsigned int to unsigned
|
|
next few fields in the order the other implementation outputs, fewer commas,
fix a big where big endian executable type wasn't detected right,
and fix the filehandle leak.
|
|
|
|
|
|
|
|
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.
|
|
The clang FORITFY implementation doesn't like pointer signedness mismatch.
"What mismatch?", you say. "The historical bug in LP32 Android that left
it with a signed socklen_t".
|
|
|
|
|
|
|
|
- per POSIX, 'cannot open' must be in the 'type' string if open() fails
(both EPERM and ENOENT); we only do that if open() succeeds and fstat(fd)
fails.
- symlink detection (as per POSIX) won't work: opening them O_RDONLY
results in following the link, then we fstat() the fd.
- file 'FIFO' causes a hang; open() won't return till there's a writer.
|
|
|
|
port 80 is not used.
|
|
Accept multiple -p, inline filter_matches, convert misleading "char* a, b" to
"char *a, b", use readfile() to read a file, use DIRTREE_SHUTUP, don't need
{ } around a single line, don't modify command line environment space
(which changes what ps/pgrep sees).
|
|
|
|
|
|
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.
|
|
Pathnames may be longer than the name field in the header, so use
strncpy() instead of xstrncpy() to avoid bailing out.
Also add unit tests to ensure proper handling of short and long
pathnames.
Change-Id: Id025891993746889564b479e5185cf9721b54a55
|
|
|
|
If we're fixing warnings in pending...
|
|
- 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.
|
|
|
|
Needs testing and a few more options connected up.
|
|
|
|
|
|
|
|
|
|
|
|
ticks _is_ 100...
|
|
|
|
Collate some repeated increments, remove some useless coments.
|
|
|
|
|
|
As with ls, it doesn't seem like -Z should be guarded behind LSM
availability. On a non-SELinux system, the label is always "unconfined".
|
|
|
|
Tempted to convert the struct arg_list and ptr_len stuff to arrays and
make the parsing table driven, but there's enough direct usages of each
field it's not a net win.
|
|
and vmlck into slot[18], pass error message to comma_args(), collate -stuUgG
callbacks into parse_rest().
|
|
Fix FLAG_w.
|
|
rather than bitfields.
|
|
Fix more l/r justification, implement uname vsz vsize and stat.
|
|
Fixes two instances of "warning: use of logical '&&' with constant operand".
Change-Id: I2bb1ba4e389f8a9e54af8ee3ab23d8849fc329f0
|
|
plus tty detection fix from Elliott Hughes.
|
|
|
|
(Assignment has spaces around operator, comparison doesn't.)
|
|
|
|
|