is enabled. This is necessary for machines on which framebuffer
console cannot be disabled at run time.
opt_wsdisplay_compat.h is generated for all ports including those
that do not support wscons.
OK Jared
wskbd_bell_data structure has value fields and operation bitmask field.
"xset b * * 0" doesn't touch period field (and doesn't initialized it)
and doesn't set DOPERIOD flag (this means that period field should not
be used). SETBELL() handles this situation appropliately.
This happened during copying wsbell.c from wskbd.c.
Fix PR xsrc/54245.
<subsystem>_<function>_<version>_hook
NFCI
XXX Note that although this introduces a change in the kernel-to-
XXX module interface, we are NOT bumping the kernel version number.
XXX We will bump the version number once the interface stabilizes.
- return -1 for error / no character
- allow 0 as a character
cngetc() itself considers any value >= 0 valid, and this matches
the usage in other drivers that return -1 for "not data", vs
polling until something arrives.
removes ^G from spewing out the askname/etc prompts when no key
has been pressed (these come from cngetsn(), ignoring unknown
non printable characters.)
from @skrll with help from @mlelstv.
These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.
To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
On 64-bit machines struct timespec50 has padding between 32-bit tv_sec
and long tv_nsec that is not affected by normal assignment. Scrub it.
The result is most likely about to be passed to the user space by the
caller, so do it here to take care of them all.
On 64-bit machines struct timespec50 has padding between 32-bit tv_sec
and long tv_nsec that is not affected by normal assignment. Scrub it
before we uiomove struct owscons_event.
if they aren't needed. This enables us to have structures of a fixed
size regardless of which child devices are configured, which enables
better modularization.
The symbol is currently used to conditionally include members of a
data structure, so without this include there could be different
structure definitions, with different sizes, and data corruption is
likely.
XXX For cleaner modularization, all of the needs-flag entries in
XXX wscons should be removed.
Works for platforms without pcppi - can work with spkr at audio and spkr
at pcppi.
To use add the following to your kernel config:
wsbell* at spkr? console?
Ok pgoyette@.
kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()
all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
- drivers can use this by setting VCONS_LOADFONT and WSSCREEN_RESIZE
- each vcons screen can now have its own font and geometry
- while there, add support for xterm's ESC[18t to report the text buffer's
size
With this tou can:
wsfontload -N foo /usr/share/wscons/fonts/flori.816
wsconsctl -dw font=foo
currently this is limited to drivers that don't use the glyph cache, like genfb
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
Discussed with martin@ and riastradh@.
designated initializers.
I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
documented in PR kern/45872. The AA() macro accessed sample coordinates as
long integers, whereas they are really stored as signed integers.
Fixes calibration on my Wetab device.