Age | Commit message (Collapse) | Author |
|
|
|
|
|
* acpi_callback had blindly assumed that a path of 26 chars or more was
the right depth; rely on depth from dirtree root
* acpi -c shows cooling device state
some backlights are set up so that they will report dimmer as higher,
but that's a hardware issue that can't be sanely worked around.
* acpi -t shows temperatures
this implementation will pick up fan, battery temperatures, etc.
(but currently not hwmon-type temperatures, or hdd temps;
acpi 1.7 does not measure these either)
we handle milli-C (typical) and deci-C (I've seen this on Qualcomm
batteries, and not yet anywhere else)
we do *not* handle deci-K yet
* acpi -V shows all sensors
* without saving the result of dirtree_path() to free later, we had
a slow leak.
all callbacks call this once, so save it in GLOBALS()
acpi -t happens to need this anyhow, though using openat()/readall()
instead of readfile() would work.
|
|
analysis, plus occasional tweak by me while reviewing them.
|
|
We xstrdup() an optargs string to avoid modifying our environment space
(because it can change what "ps" shows to other processes), and then parse
out colon delimited strings and save them in globals that can later be used
in the -v codepath and so on. But those globals _aren't_ strdup (no point)
which means we can't free the string while we're still using pointers into
the middle of it. So move the free to the end.
(I hardly ever test with CFG_TOYBOX_FREE switched on because even nommu
doesn't need it.)
|
|
toys/pending/README), this can be probed from the source.)
|
|
polish beyond this.)
|
|
|
|
|
|
The Linux man page says I can use AT_SYMLINK_NOFOLLOW. It works in glibc,
uclibc, and klibc, but musl returns -EINVAL any time you pass in that flag
and the maintainer says that's not a bug and insists the man page and those
other libraries all change to match musl's behavior.
Toybox uses it to avoid scheduling unnecessary metadata writes for things we're
about to delete (have to chmod unreadable directories so we can descend into
them to delete their contents, the chmod happens before we descend so the
disk I/O has plenty of time to be scheduled) because the extra writes wear out
SSD faster. It's just an optimization and I don't really care if it works
_well_ (the fchmodat call _also_ takes AT_SYMLINK_NOFOLLOW so that's covered),
but musl's behavior uniquely makes the check always error and thus breaks normal
"rm -r".
Yes this workaround is checking #ifdef __MUSL__ which the library does not
supply (because its code is perfect and will thus never need to be worked
around). You can CFLAGS=-D__MUSL__ if you don't echo "#define __MUSL__" >>
include/features.h when installing the library.
|
|
for libc, so we have to implement it here.
|
|
_route_ and _tunnel_ options.
|
|
mount, 2) Don't stop checking filesystem types due to EBUSY, it may mean already mounted by another filesystem type you haven't tried yet.
|
|
add better error reporting.
|
|
|
|
|
|
|
|
|
|
|
|
OLDTOY standalone (if it has its own config symbol).
|
|
another command's help.
|
|
(line separator), and "/" (filename separator).
Restricting usernames to the legacy posix character allowed set (for filenames,
so the $HOME directory is creatable on VFAT and similar) means you can't have
UTF-8 usernames. Linux allows any character but / and NUL in filenames.
Since root is creating these entries, we assume root knows what it's doing.
|
|
|
|
|
|
|
|
Sharma.
dirtree->name is an array, not a pointer, so can't be zero. Remove the test.
We dereference plen without checking it for null but calling dirtree_path(0, 0)
is pilot error: only the _first_ call can have plen = 0. Add a comment.
|
|
|
|
I've been locally patching uClibc to not violate posix-2008 (you don't need
to define a GNU macro to get a posix function), but uClibc is obsolete and
moribund (development peaked in 2006, last bugfix release was over 2 years
ago), and the largest remaining user (buildroot) doesn't bother to apply such
a patch. Since even buildroot is slowly migrating to musl-libc, just do the
portability tweak for what the last release of the old thing actually did.
|
|
back off if necessary.
|
|
just remove the "generated" directory entirely.
|
|
|
|
|
|
|
|
(Did you know you can test individual commands with scripts/test.sh command?
Now you do...)
|
|
It's just a word. Capitalize at the start of the sentence, otherwise don't.
Yeah, it could be always capitalized as a proper name but since the command
"toybox" is all lower case, that would be weird.
|
|
actually in the "kconfig" directory, not under scripts. Remind me to write a new one from scratch...
(Someone actually submitted a basic kconfig rewrite in awk once, but until I
bite the bullet and write my own awk.c, I just don't know awk well enough to
maintain a large script written in it. Back when I maintained kernel.org/doc
I wrote http://landley.net/hg/kdocs/file/tip/make/menuconfig2html.py but
I am NOT reintroducing python as a build dependency. And neither actually
implemented actual menuing part. So... todo list.)
|
|
and make ctrl-c kill "make test" more reliably.
|
|
try to keep large SMP machines busy (each compiler invocation is short so they exit almost as fast as we launch them).
|
|
into GLOBALS.
|
|
search.
(Fixes messages about not being able to delete directories when running make test).
|
|
|
|
Other versions are adding Cached from /proc/meminfo to free buffers/cache
(and subtracting it from used), but sysinfo() doesn't provide it. (But it
provide "high memory", which hasn't been relevant for almost a decade...)
But that's a design change, not a cleanup issue.
|
|
(grandfathered) awaiting cleanup.
|
|
|
|
Cut predates the "pending" directory, so was checked in as-is. Ashwini
Sharma's recent static analysis fixes touched this file, but there's a lot
more to do than the static analyzer found.
|
|
|
|
|
|
|
|
|
|
we want to redirect both, one, or neither of stdin/stdout.
|