Age | Commit message (Collapse) | Author |
|
Top bits count too!
|
|
|
|
Full POSIX stty with Linux extensions. Output and behavior match coreutils
8.26 as far as I can tell. For some reason busybox 1.22 stty always
shows all the special characters, even when they match "sane". I've
matched coreutils, since "shows differences from sane" is easy to describe
and obviously useful.
Flags in the various arrays are not in the order they're introduced in
POSIX or in the Linux header file: they're in the order that they're
output by coreutils' stty.
The -g output matches coreutils and busybox.
I implemented iuclc, xcase, and olcuc even though they've been removed
from POSIX because the others implement them, and "man stty" defines "raw"
and "sane" in terms of them (where POSIX doesn't define "sane" in any
useful sense).
This builds fine against glibc 2.24, and as far as I can tell all the
constants used were in Linux 2.6 so I'm assuming that there shouldn't
be any #ifdef nonsense needed for any reasonable vintage of C library.
|
|
|
|
|
|
|
|
|
|
|
|
simplify strstarteq, use local variable "conv" instead of toys.optargs.
|
|
Android forces -Wformat on for all source.
toys/pending/expr.c:116:28: warning: field precision should have type 'int',
but argument has type 'long' [-Wformat]
ret->s = xmprintf("%.*s", m[1].rm_eo-m[1].rm_so, target+m[1].rm_so);
~~^~ ~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
Everyone forgets that mmap returns MAP_FAILED rather than NULL on failure.
Every use of mmap in toybox was either doing the wrong check, or no check
at all (including the two I personally added).
|
|
|
|
|
|
|
|
Also trivial cleanup of pipe -> xpipe.
Bug: http://b/38215123
|
|
|
|
|
|
The argument to help_exit is a char*, not a FILE*.
|
|
Also refactor so that legacy mode gets all the new functionality too, and
add -S to make it easier to test legacy mode on 3.5 or newer kernels (at least
on the host; on Android the syslog(2) system call is no longer allowed).
Bug: http://b/36090178
|
|
to unify the two codepaths in Elliott's rewrite.
|
|
|
|
The finit_module() system call, introduced in Linux 3.8, reads the
module from a supplied file descriptor. This allows the kernel to do
security checks based on the file's location.
|
|
While most systems have their kernel modules, modules.dep etc located at
/lib/modules/`uname -r` this is not always the case.
The -d option may be used to specify a nonstandard path for these files.
It may be used more than once to specify multiple directories where
these files may be found.
|
|
|
|
Recognize full range of linux serial speeds (only error cfsetspeed returns
is invalid speed value).
|
|
|
|
Our device bringup folks wanted a simple serial console, both on the
host and on the device. This is certainly enough to replace what I've
been using personally on the host.
I'd never heard of "microcom" until I asked the internets what busybox
users use, so I don't care what we call this or what the options are
called. (But would like to decide before it gets ossified in a million
factory test scripts and the like!)
The tool that this replaces for me defaulted to /dev/ttyUSB0, but since
I don't know whether that default would be useful for most other people
too, I left that out. Command-line history will solve my transition
problem.
|
|
for a reason and I need to completely rewrite it.
|
|
upload/download that aren't implemented yet.)
|
|
sizeof(int) != sizeof(size_t) for LP64, leading to hilarity^Wcrashes.
|
|
Kernel can handle 64k maximum segment size.
|
|
line aren't filtered out. Audited all the callers and removed redundant
calls, adjusted call sequence, etc. (And let rm _not_ do this, because posix.)
|
|
screwed up "tar c" to stdout.
|
|
|
|
|
|
without getfattr, so I'm putting it back in pending for now.
|
|
|
|
|
|
Requested by a Google team whose product is based on Android.
|
|
|
|
|
|
|
|
seek so seek time is included in total.
|
|
add xopenro() that takes one argument and understands "-" means stdin,
and switch over lots of users.
|
|
Plus basic tests.
|
|
Support hex (requested by users).
Support status=noxfer and status=none (requested by users).
Fix status output.
Clarify large numbers in --help output.
Use O_TRUNC rather than ftruncate unless we're also seeking.
New tests.
Also partial cleanup (reuse of existing code, removal of non-GLOBALS globals,
and merge dd_main and do_dd).
|