Age | Commit message (Collapse) | Author |
|
|
|
|
|
Replace goto with if block to make variable lifetimes clearer.
|
|
|
|
|
|
New (https://austingroupbugs.net/view.php?id=339) names for the
existing _NPROCESSORS_CONF and _NPROCESSORS_ONLN.
|
|
|
|
In the user version, if you use ionice to get the process IO
priority without permission, -1 will be returned, but Idle: prio 7
will be printed at this time. This is an incorrect priority and
should return permission denied.
|
|
|
|
* When running the "paste" command and failed to open the paste file
(such as file not found or permission error), don't crash the entire
microcom program. Instead print the error message and give the user a
chance to fix the problem.
* If "paste" command is cancelled by "ESC" or an empty file name, clear
the hanging "Filename:" prompt before returning to the main loop.
|
|
|
|
back to the shell.
|
|
|
|
|
|
|
|
Right now the (-f) option just opens the tty file and does nothing.
Change it so that we actually read from / write to the specified file.
|
|
|
|
The help text tries to answer the questions "what does this command
do and how do I use it". Toybox silently accepts a lot of compatibility
flags like patch -u that aren't in the help text to let it run existing
scripts, but skips documenting them if doing so wouldn't doesn't help
write NEW scripts.
|
|
|
|
|
|
Glibc 2.31 broke the settimeofday() wrapper to return EINVAL if you set
the time and kernel timezone in the same call. (I have no idea why.)
Musl broke the settimeofday() wrapper to never call the settimeofday
syscall at all, which is the only way to set kernel timezone, and
then for good measure removed the __NR_settimeofday symbol from their
headers because people were still using it. (So use kernel header instead.)
(The kernel timezone is used on machines that dual boot with windows,
where the hardware clock is generally set to local time to humor windows.
Various filesystem code uses it to adjust the time read from and saved
to filesystems shared with windows.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Since the point here is to get a notification for every event, and
there's one line per event, line buffering is the right choice.
|
|
|
|
|
|
|
|
|
|
|
|
reading /proc/mounts and asking for follow-up data from sysfs,
readfile() returns NULL and there should have been an else case setting
it back to "" instead of NULL so the printf() and if (!*ss) free(ss)
didn't try to dereference the NULL.
That said, the initial "" was only specutavely replaced and then needing
to be put back because code really wants a third variable, and I can
re-use s if I move the xabspath() down a bit, so...
|
|
|
|
|
|
I couldn't work out how to get gcc to actually produce such a thing, but
/bin/dbxtool on my debian box right now has them.
The big mistake here is that GNU property notes' data is always 8-byte
aligned, so we needed to skip that. That lets us get rid of the existing
loop termination hack to skip padding.
While I'm here -- since the symptom was running off the end of the file --
I've also added a bounds check in the property dumping loop.
I wish I had fuzzing infrastructure to run AFL++ against this every time
it changes... In lieu of that I do wonder whether we should add `readelf
-aW /bin/* > /dev/null` as a smoke test that "at least it works for all
the _valid_ binaries on the system you're testing on". That would have
caught this sooner.
|
|
When dumping a file containing some NUL characters, the display is wrong
because all remaining characters on the line are replaced by NUL. This
error comes from the fact that the copy of the read buffer into the
line buffer is done using strncpy() which handles NUL character as end
of string and pads the destination buffer with NUL afterwards.
To avoid data manipulation during buffer copy, simply replace strncpy()
with its memory equivalent memcpy() that does not interpret the read
data.
Signed-off-by: Mathieu Anquetin <mathieu.anquetin@groupe-cahors.com>
|
|
Also fix -b to use \a (alarm) rather than \b (backspace).
|
|
|
|
|
|
|
|
No idea if Mac or FreeBSD has renameat2(), but glibc refusing to wrap a 10
year old Linux syscall without "#define hurd" is also ridiculous, so I wrapped
the syscall myself in portability.c.
|
|
|
|
|
|
|
|
|
|
testcmd, Rearange/Rewrite large comments to be C99, reange code (main at bottom, do_command above it), Remove some function prototypes, Remove "!= 0/NULL", "x == 0" to "!x", uint32_t to unsigned, uint8_t to char, remove vli_type typedef, remove inline (useless in modern C), Hex -> Dec when under 10,
|
|
|
|
|