Commit Graph

488 Commits

Author SHA1 Message Date
Andrew Gallatin
9ffbfb248b Spell #if 0 correctly 2002-02-14 22:29:03 +00:00
Maxim Sobolev
42b841a9c9 In the word selection mode don't append newline if the word ends at the
screen boundary.
2002-01-05 16:52:44 +00:00
Maxim Sobolev
c1f25b2f6b Fix POLA - when selecting line into syscons' cut'n'paste buffer (double
click) do not include newline into the buffer. This is exacly how
things worked before my recent changes to the cut'n'paste code and
how they work in 4-STABLE.
2001-11-25 22:51:30 +00:00
Dag-Erling Smørgrav
f61769f009 More drive-by stylification, and some clarifications 2001-11-06 03:28:21 +00:00
Dag-Erling Smørgrav
1619a4903d More drive-by stylification 2001-11-06 02:40:09 +00:00
Dag-Erling Smørgrav
ff95e02306 Drive-by stylification + reintroduce set_border(). 2001-11-06 02:38:09 +00:00
Mitsuru IWASAKI
f9390180fe Some fix for the recent apm module changes.
- Now that apm loadable module can inform its existence to other kernel
   components  (e.g. i386/isa/clock.c:startrtclock()'s TCS hack).
 - Exchange priority of SI_SUB_CPU and SI_SUB_KLD for above purpose.
 - Add simple arbitration mechanism for APM vs. ACPI.  This prevents
   the kernel enables both of them.
 - Remove obsolete `#ifdef DEV_APM' related code.
 - Add abstracted interface for Powermanagement operations.  Public apm(4)
   functions, such as apm_suspend(), should be replaced new interfaces.
   Currently only power_pm_suspend (successor of apm_suspend) is implemented.

Reviewed by:	peter, arch@ and audit@
2001-11-01 16:34:07 +00:00
David E. O'Brien
2a200695e4 Add the TGA video driver. This is a great accomplishtment and will help
us a lot on older Alphas.
Andrew Gallatin, Thomas V. Crimi, and Peter Jeremy contributed to this
work along with the submitter.

Submitted by:	 Andrew M. Miklic <miklic@home.com>
2001-11-01 08:26:30 +00:00
Jonathan Lemon
553b79aa63 cn_tab no longer exists, use cnadd() to add a console device. Note that
this may result in duplicate console output in some cases.
2001-10-24 18:30:05 +00:00
Doug Rabson
bb94354d67 Enable console. There are far too many 'ifdef __i386__' in this file. 2001-10-06 13:34:30 +00:00
Robert Watson
8c7cc7234e o Modify syscons ioctl securelevel checks to use securelevel_gt() (oh look,
yet another API to do direct hardware I/O access.)

Obtained from:	TrustedBSD Project
2001-09-26 20:17:15 +00:00
Maxim Sobolev
78f45204d9 Introduce new syscons(4) kernel options:
- SC_CUT_SPACES2TABS - when copying text into the cut buffer convert leading
  spaces into the tabs;
- SC_CUT_SEPCHARS="XYZ" - treat supplied characters as possible words
  separators when the driver searches for words boundaries when doing cut
  operation.

Also unify cut code a bit to decrease amount of duplicated code. This fixes
line cut mode, so that it is no longer pads line with useless spaces.

Approved by:	ru
2001-09-21 20:41:24 +00:00
Julian Elischer
b40ce4165d KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
Peter Wemm
22c1cd205e Fix some malformed macro concatenation that gcc-3 has objections about. 2001-09-10 04:20:34 +00:00
Peter Wemm
20d6258def repo-copy the source files from modules/syscons to the normal tree
and connect them to the normal build infrastructure.
2001-08-09 00:02:30 +00:00
Kazutaka YOKOTA
d959336c3b Don't call wakeup() while we are in DDB. The patch was
developed by bde. I added the same check in one more place
where wakeup() might be called during the DDB session.
Submitted by: bde
2001-08-07 11:51:26 +00:00
Kazutaka YOKOTA
2fe5e0b184 Use #ifdef DEV_SPLASH (from opt_splash.h) rather than
#if NSPLASH > 0 (from splash.h) to test the presence
of the splash driver.
2001-08-02 13:22:33 +00:00
Kazutaka YOKOTA
eac47d67be Add FBIO_BLANK ioctl support. Return ENODEV for yet-to-be-
supported ioctls for now.
2001-08-02 11:26:30 +00:00
Kazutaka YOKOTA
4866e2769a Refine cursor type/shape control escape sequences and
ioctls. We can now add ve, vi and vs capabilities to
cons25 in termcap.

Discussed with and tested by: ache
2001-08-02 08:30:40 +00:00
Dima Dorfman
635751fa8c Fix grammar nit. 2001-08-01 20:16:12 +00:00
Kazutaka YOKOTA
a4fc697e58 - Fix "off by one" error in VT_WAITACTIVATE. Correctly accept
0 as meaning the requesting vty.
- Accept 0 as the requesting vty in VT_ACTIVATE as in VT_WAITACTIVE.

PR: 24423
MFC after: 10 days
2001-07-22 13:58:23 +00:00
Kazutaka YOKOTA
34e45f9e71 Fix off by one error for ESC[1J.
PR: kern/18381
MFC after: 10 days
2001-07-20 14:08:12 +00:00
Kazutaka YOKOTA
4dbf3ccb9b Define a couple of subroutines to replace duplicated common code. You
shoulnd't see any functional difference.
2001-07-20 13:10:59 +00:00
Kazutaka YOKOTA
9a3a173bd3 - Define a convenience macro ISTTYOPEN().
- Slightly refine screen saver logic.

No functional change.
MFC after:	2 weeks
2001-07-12 11:43:29 +00:00
Kazutaka YOKOTA
44b37d9627 Fix dependencies between kernel options:
- When both SC_PIXEL_MODE and SC_NO_FONT_LOADING are defined,
  quietly drop SC_NO_FONT_LOADING, because the pixel(raster)
  console requires font.
- When SC_NO_FONT_LOADING is defined, force SC_ALT_MOUSE_IMAGE.
  Without font, the arrow-shaped mouse cursor cannot be drawn.
- Fiddle and simplify some internal macros.
MFC after:	2 weeks
2001-07-10 14:13:34 +00:00
Kazutaka YOKOTA
e67e345124 Call ttymalloc() when sysmouse is opened, rather than
when the driver is attached.
MFC after:	2 weeks
2001-07-06 03:24:40 +00:00
Kazutaka YOKOTA
fa783074ac Remove the resume method. It is not necessary any more, because
keyboard drivers have it now...
MFC after:	4 weeks
2001-06-30 10:15:13 +00:00
Kazutaka YOKOTA
1036bb970a If we are in DDB, don't switch to a vty in the VT_PROCESS mode.
MFC after:	2 weeks
2001-06-30 09:10:00 +00:00
John Baldwin
6be523bca7 Add a new MI pointer to the process' trapframe p_frame instead of using
various differently named pointers buried under p_md.

Reviewed by:	jake (in principle)
2001-06-29 11:10:41 +00:00
Kazutaka YOKOTA
2317b70167 Don't free buffers we didn't allocate.
MFC after:	2 weeks
2001-06-29 08:24:56 +00:00
Kazutaka YOKOTA
cb082ac476 Quit the ioctl MOUSE_GETINFO as soon as we have gathered necessary
information.  There is no need to stick around any longer.
MFC after:	2 weeks
2001-06-29 07:17:14 +00:00
Kazutaka YOKOTA
3b34b2da35 Test "sc->kbd != NULL" rather than "sc != NULL" before
accessing the keyboard in scopen().
MFC after:	2 weeks
2001-06-29 06:42:39 +00:00
Peter Wemm
f41325db5f With this commit, I hereby pronounce gensetdefs past its use-by date.
Replace the a.out emulation of 'struct linker_set' with something
a little more flexible.  <sys/linker_set.h> now provides macros for
accessing elements and completely hides the implementation.

The linker_set.h macros have been on the back burner in various
forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()),
John Polstra (ELF clue) and myself (cleaned up API and the conversion
of the rest of the kernel to use it).

The macros declare a strongly typed set.  They return elements with the
type that you declare the set with, rather than a generic void *.

For ELF, we use the magic ld symbols (__start_<setname> and
__stop_<setname>).  Thanks to Richard Henderson <rth@redhat.com> for the
trick about how to force ld to provide them for kld's.

For a.out, we use the old linker_set struct.

NOTE: the item lists are no longer null terminated.  This is why
the code impact is high in certain areas.

The runtime linker has a new method to find the linker set
boundaries depending on which backend format is in use.

linker sets are still module/kld unfriendly and should never be used
for anything that may be modular one day.

Reviewed by:	eivind
2001-06-13 10:58:39 +00:00
Poul-Henning Kamp
266aa94283 Make the beep duration independent of HZ.
PR:		25201
Submitted by:	Akio Morita amorita@meadow.scphys.kyoto-u.ac.jp
MFC after:	1 week
2001-05-28 21:11:38 +00:00
Dima Dorfman
83d94cdf69 In the VIRTUAL_TTY macro, add a check to make sure that the result of
SC_DEV isn't NULL; if it is, evaluate to NULL and don't dereference
NULL.  Callers of VIRTUAL_TTY must already check for the result being
NULL since si_tty can be NULL, so this should be safe.

This fixes a panic when trying to switch to a different vty in an
environment such as userconfig (-c option to the kernel).

PR:		26508
2001-05-27 00:57:25 +00:00
Dima Dorfman
b3c2cf17ee Add a CONS_CLRHIST ioctl which instructs syscons to clear the history
(scroll-back) buffer.

PR:		27616
Reviewed by:	ru
2001-05-27 00:45:59 +00:00
Nik Clayton
96bf38f272 Add a new ioctl to syscons, CONS_SCRSHOT. Given a userland buffer, it
copies out the current contents of the video buffer for a syscons terminal,
providing a snapshot of the text and attributes.

Based heavily on work originally submitted by Joel Holveck <joelh@gnu.org>
for 2.2.x almost 30 months ago, which I cleaned up a little, and forward
ported to -current.

See also the usr.bin/scrshot utility.
2001-05-18 08:52:56 +00:00
Mark Murray
fb919e4d5a Undo part of the tangle of having sys/lock.h and sys/mutex.h included in
other "system" header files.

Also help the deprecation of lockmgr.h by making it a sub-include of
sys/lock.h and removing sys/lockmgr.h form kernel .c files.

Sort sys/*.h includes where possible in affected files.

OK'ed by:	bde (with reservations)
2001-05-01 08:13:21 +00:00
John Baldwin
33a9ed9d0e Change the pfind() and zpfind() functions to lock the process that they
find before releasing the allproc lock and returning.

Reviewed by:	-smp, dfr, jake
2001-04-24 00:51:53 +00:00
Andrey A. Chernov
475693945d Upper limit of mousechar start is UCHAR_MAX - 3, not UCHAR_MAX - 4
Restore original characters when mousechar start changes, not always 0-3

PR:		24437
Submitted by:	Cejka Rudolf <cejkar@dcse.fee.vutbr.cz>
2001-04-21 14:11:48 +00:00
Poul-Henning Kamp
f83880518b Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.
2001-03-26 12:41:29 +00:00
Andrey A. Chernov
807ef2d03f Multiply empty lines pasted as single line, fix it 2001-03-13 10:23:01 +00:00
Andrey A. Chernov
74f62e12aa Don't require that mouse cursor must be visible before mouse paste.
Paste always happens to current _text_ cursor position independently of
mouse cursor position in any case and old variant force user to press
mouse paste button _two_ times if mouse cursor is invisible.
2001-03-12 01:15:11 +00:00
Andrey A. Chernov
4629b5e0fb Implement keyboard paste
PR:		25499
Submitted by:	Gaspar Chilingarov <nm@web.am>
2001-03-11 22:51:05 +00:00
John Baldwin
19eb87d22a Grab the process lock while calling psignal and before calling psignal. 2001-03-07 03:37:06 +00:00
John Baldwin
cf0a305e5b Indent the comment about the Alpha palette evilness correctly.
Noticed by:	bde
2001-03-06 20:36:06 +00:00
Andrey A. Chernov
55cafc98c5 Fix longstanding mouse cursor bug: blinking and eating all CPU while near text
cursor.
The reason is: mouse cursor goes into hide/visible loop while text cursor even
not moved.

PR:		25536
Submitted by:	David Xu <davidx@viasoft.com.cn>
2001-03-06 00:02:47 +00:00
John Baldwin
329292029c The SRM console gets the red and blue attributes backwards in the VGA
palette.  As a result, the colors on the video console can look rather
weird.  For example, sysinstall on the alpha has a read background.  We
can work around this partially by remapping the colors used by syscons for
the ANSI color escape sequences.  Note that screen savers and anything that
sets the colors explicitly will still get incorrect colors, but programs
such as sysinstall will now use the correct colors.  A more correct fix
would be to actually fix the VGA palette on boot by either swapping all
the red and blue attributes or by hardcoding a standard palette and
overwriting the entire palette.

Requested by:	gallatin
Obtained from:	NetBSD
2001-03-05 22:43:39 +00:00
Yoshihiro Takahashi
2eb8169a1a Fixed warnings. 2001-02-21 11:28:02 +00:00
Yoshihiro Takahashi
ba4c5e6950 Added necessary include for pc98. 2001-01-25 09:56:04 +00:00