summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/syscons.c
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2005-05-21 20:32:27 +0000
committermarius <marius@FreeBSD.org>2005-05-21 20:32:27 +0000
commit5da7e2536006cfc98710a87ba5f16748fa8cbd00 (patch)
treeea0cf0b373374b4007a60fcd7e66386f2c197648 /sys/dev/syscons/syscons.c
parent524bb272a307ca9db2e35e23542f13c17af56f42 (diff)
downloadFreeBSD-src-5da7e2536006cfc98710a87ba5f16748fa8cbd00.zip
FreeBSD-src-5da7e2536006cfc98710a87ba5f16748fa8cbd00.tar.gz
- Not every architecture defaults to a black background (e.g. sparc64
uses white) so base the color of the border on SC_NORM_ATTR rather than hardcoding BG_BLACK. - Use SC_DRIVER_NAME rather than hardcoding 'sc' in message strings (see also sys/dev/syscons/syscons.h rev. 1.82).
Diffstat (limited to 'sys/dev/syscons/syscons.c')
-rw-r--r--sys/dev/syscons/syscons.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 66ef368..bc81080 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -229,7 +229,7 @@ sc_probe_unit(int unit, int flags)
{
if (!scvidprobe(unit, flags, FALSE)) {
if (bootverbose)
- printf("sc%d: no video adapter found.\n", unit);
+ printf("%s%d: no video adapter found.\n", SC_DRIVER_NAME, unit);
return ENXIO;
}
@@ -376,10 +376,10 @@ sc_attach_unit(int unit, int flags)
kbd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode);
update_kbd_state(scp, scp->status, LOCK_MASK);
- printf("sc%d: %s <%d virtual consoles, flags=0x%x>\n",
- unit, adapter_name(sc->adp), sc->vtys, sc->config);
+ printf("%s%d: %s <%d virtual consoles, flags=0x%x>\n",
+ SC_DRIVER_NAME, unit, adapter_name(sc->adp), sc->vtys, sc->config);
if (bootverbose) {
- printf("sc%d:", unit);
+ printf("%s%d:", SC_DRIVER_NAME, unit);
if (sc->adapter >= 0)
printf(" fb%d", sc->adapter);
if (sc->keyboard >= 0)
@@ -914,7 +914,7 @@ scioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
struct proc *p1;
mode = (struct vt_mode *)data;
- DPRINTF(5, ("sc%d: VT_SETMODE ", sc->unit));
+ DPRINTF(5, ("%s%d: VT_SETMODE ", SC_DRIVER_NAME, sc->unit));
if (scp->smode.mode == VT_PROCESS) {
p1 = pfind(scp->pid);
if (scp->proc == p1 && scp->proc != td->td_proc) {
@@ -981,15 +981,15 @@ scioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
switch(*(intptr_t *)data) {
case VT_FALSE: /* user refuses to release screen, abort */
if ((error = finish_vt_rel(scp, FALSE, &s)) == 0)
- DPRINTF(5, ("sc%d: VT_FALSE\n", sc->unit));
+ DPRINTF(5, ("%s%d: VT_FALSE\n", SC_DRIVER_NAME, sc->unit));
break;
case VT_TRUE: /* user has released screen, go on */
if ((error = finish_vt_rel(scp, TRUE, &s)) == 0)
- DPRINTF(5, ("sc%d: VT_TRUE\n", sc->unit));
+ DPRINTF(5, ("%s%d: VT_TRUE\n", SC_DRIVER_NAME, sc->unit));
break;
case VT_ACKACQ: /* acquire acknowledged, switch completed */
if ((error = finish_vt_acq(scp)) == 0)
- DPRINTF(5, ("sc%d: VT_ACKACQ\n", sc->unit));
+ DPRINTF(5, ("%s%d: VT_ACKACQ\n", SC_DRIVER_NAME, sc->unit));
break;
default:
break;
@@ -2992,7 +2992,7 @@ init_scp(sc_softc_t *sc, int vty, scr_stat *scp)
scp->tsw = NULL;
scp->ts = NULL;
scp->rndr = NULL;
- scp->border = BG_BLACK;
+ scp->border = (SC_NORM_ATTR >> 4) & 0x0f;
scp->curr_curs_attr = scp->dflt_curs_attr = sc->curs_attr;
scp->mouse_cut_start = scp->xsize*scp->ysize;
scp->mouse_cut_end = -1;
OpenPOWER on IntegriCloud