Fix a bug from when the ToD variable was added (July 2017) where if
TZ is unset, and ToD_FORMAT contains and strftime() conversions which
need to know the zone, bad things happen.
Amazing that no-one (incl me) ever noticed this.
XXX pullup -9, pullup -10 (and -8 from 8.0_RC1 onwards ... sigh)
some updates:
- setup attributes for RGB8 in the image planes and 8I in the overlay
- explicitly select LUT 0 for the overlay so we don't depend on what STI sets
anymore - now this should work on all FX cards
- expose 24bit framebuffer to X
- make sure we switch overlay transparency according to WSDISPLAY_SMODE
- remove unnecessary register writes when accessing the colour map
- no need to call summitfb_setup_fb() in summitfb_do_cursot() - that was for
HCRX and friends
- support screen blanking
Sprinkle about some cycle wasting checks for the win pointer being
null. Unfortunately, ncurses does this and there is some sloppy code
out there that relies on the check resulting in segfaults in
NetBSD curses which then, of course, gets blamed for the error.
Make sure that local var=$expansion is properly quoted as local var="$exp"
correcting some quotes incorrectly removed in the previous version, and
adding some that should have been present but never were.
This pointed out by riastradh@ -- thanks.
Also, one addition which should have been the previous update's commit
message - a couple of uses of subshells, where the only reason was to
control shell operator precedence (which works, but is costly) were changed
(in the previous rev) to use groups instead (ie: brace bracketing instead of
parentheses).
distrib/sets/lists/tests/mi: Copied & pasted wrong line, oops.
This shiny new test is definitely not obsolete!
Should fix:
atf-run: ERROR: Cannot locate the t_time_arith file
PR kern/58922: itimer(9): arithmetic overflow
PR kern/58925: itimer(9) responds erratically to clock wound back
PR kern/58926: itimer(9) integer overflow in overrun counting
PR kern/58927: itimer(9): overrun accounting is broken
t_time_arith: New test for timer calculations.
This will facilitate fixing various problems in the arithmetic to
determine, given an itimer's scheduled time (it_value) and periodic
interval (it_interval) along with the current time of actual expiry
(now), what time the itimer should be rescheduled for (next, new
value of it_timer) on the same clock.
Later we can also put tests for other functions like tvtohz here, and
make them test many different values of hz/tick.
XXX Not 100% sure about all of these cases -- there is some room for
reasonable discussion about what the right answer is. But we have
unquestionably implemented the wrong thing for many of these cases,
even if the answers this test checks for may not be quite right yet.
PR kern/58922: itimer(9): arithmetic overflow
PR kern/58925: itimer(9) responds erratically to clock wound back
PR kern/58926: itimer(9) integer overflow in overrun counting
PR kern/58927: itimer(9): overrun accounting is broken
subr_time.c: Sort includes.
No functional change intended.
Preparation for factoring out arithmetic to test and fix:
PR kern/58922: itimer(9): arithmetic overflow
PR kern/58925: itimer(9) responds erratically to clock wound back
PR kern/58926: itimer(9) integer overflow in overrun counting
PR kern/58927: itimer(9): overrun accounting is broken
limits.h: Define DELAYTIMER_MAX.
This is the maximum value of timer_getoverrun(), and was introduced
in IEEE Std 1003.1b-1993.
Prompted by:
PR kern/58926: itimer(9) integer overflow in overrun counting
kern_time.c: Sort includes. Add missing includes.
No functional change intended.
Preparation for factoring out arithmetic to add tests for and fix:
PR kern/58922: itimer(9): arithmetic overflow
PR kern/58925: itimer(9) responds erratically to clock wound back
PR kern/58926: itimer(9) integer overflow in overrun counting
PR kern/58927: itimer(9): overrun accounting is broken
closef(9): Assert no ERESTART from struct fileops::fo_close.
This cannot possibly work so make sure we flag it early.
Currently the sys_close wrapper will neuter ERESTART by mapping it to
EINTR, but let's catch this mistake earlier where we have better
diagnostic information available like what the fo_close function is.
(Haven't seen the printf fire in the >decade since I added it, so I
think this KASSERT is unlikely.)
close(2): Document the finality of closing.
Even if close(2) returns -1 on error, the descriptor is closed (or
was already closed).
POSIX doesn't specify this, but that's a bug in POSIX (probably to
accommodate some buggy ancient proprietary Unix). Every free
software OS kernel I checked works the same way and it is important
to be able to reliably close descriptors with finality.