so pid files can be written in /var/run when started as root.
I do not expect this to cause any security issues, but if anyone objects
it could be easily reverted.
PR: bin/159568
MFC after: 4 weeks
It's too late to change this in 9.0 -- so we have a release with the
misspelling in the wild and should not break users that depend on it.
Deprecating/replacing it because of a one-char typo seems excessive.
The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.
This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.
In this contest, index refers to the index(3) function. In this case it
doesn't really harm, as this function is never called with idx == NULL.
MFC after: 2 weeks
- use warnx() to tell the user whether a process is running in normal,
idle or realtime priority. with the old code it would have been possible
for another process to send data to stdout between
printf("%s: ", p);
and
printf("* priority\n");
and thus break the formatting.
- 'rtprio 10 -0' triggeres non-intuitive behavior. It would first set the
priority of itself to 10 *and* would then try to execute '-0'. Of course,
setting the priority of [id|rt]prio itself doesn't make a lot of sense,
but it is intuitive compared to the previous behavior.
- 'rtprio -t --1' will actually pass over the '-1' to rtprio(). Now
invoking rtprio like this will catch the wrong usage before passing
over the invalid argument to rtprio().
- Garrett Cooper suggested to add further diagnostics where the failure
occures, if execvp fails.
PR: bin/154042
Submitted by: arundel
MFC after: 1 month
- Fix boot0 to check for PXE when using the pre-set setting for the
preferred slice.
- Update boot0cfg to use slice 6 to select PXE. Accept a 'pxe' argument
instead of a number for the 's' option as a way to select PXE as well.
Submitted by: Andrew Boyer aboyer averesystems
MFC after: 2 weeks
- Let panic() use _Noreturn and __printflike() instead of GCC-specific
attributes.
- Remove prototype from ffs_subr.c and let it include ffs_extern.h.
- Forward declare struct inode to make ffs_extern.h not depend on it.
- Cast time_t's to long, and print them with %ld.
- Print ptrdiff_t's with %td.
- Print ssize_t's and size_t's with %zd and %zu.
- Print int32_t's with %d.
Also, replace some int variables with the more appropriate size_t.
MFC after: 1 week
x86, any alignment warnings can be safely ignored. Define YY_NO_INPUT
in usr.sbin/ndiscvt/inf-token.l, so no unused lex functions are defined.
MFC after: 1 week
None of the symbols provided by kbdcontrol.c are used by other source
files of this binary. Slightly reduce the binary size and make much more
symbols read-only by adding proper static and const keywords.
While there, remove the false optimisation of the colors array. It seems
that changing it to an array of pointers instead of a 16x16 array does
not cause any increase in binary size at all.