aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2020-09-01 21:29:44 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-09-01 21:29:44 +0000
commitd63738087ebc42e331a8147c74b690c1f0923f6b (patch)
treef7bc5ea28a58ee164af5ab5e9f0eeed73cf20fe3 /sys/dev/syscons
parentbed02296486703b962e60a790842e5628d289d25 (diff)
Notes
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/daemon/daemon_saver.c2
-rw-r--r--sys/dev/syscons/logo/logo_saver.c16
-rw-r--r--sys/dev/syscons/rain/rain_saver.c6
-rw-r--r--sys/dev/syscons/scgfbrndr.c2
-rw-r--r--sys/dev/syscons/schistory.c1
-rw-r--r--sys/dev/syscons/scmouse.c1
-rw-r--r--sys/dev/syscons/scterm-sc.c3
-rw-r--r--sys/dev/syscons/scvesactl.c1
-rw-r--r--sys/dev/syscons/scvgarndr.c2
-rw-r--r--sys/dev/syscons/scvidctl.c1
-rw-r--r--sys/dev/syscons/syscons.c3
-rw-r--r--sys/dev/syscons/sysmouse.c1
-rw-r--r--sys/dev/syscons/warp/warp_saver.c8
13 files changed, 17 insertions, 30 deletions
diff --git a/sys/dev/syscons/daemon/daemon_saver.c b/sys/dev/syscons/daemon/daemon_saver.c
index ddcaeea091f5..5fcc3d942118 100644
--- a/sys/dev/syscons/daemon/daemon_saver.c
+++ b/sys/dev/syscons/daemon/daemon_saver.c
@@ -359,7 +359,7 @@ daemon_init(video_adapter_t *adp)
for (;;) {
hostlen = strlen(prison0.pr_hostname);
mtx_unlock(&prison0.pr_mtx);
-
+
messagelen = hostlen + 3 + strlen(ostype) + 1 +
strlen(osrelease);
message = malloc(messagelen + 1, M_DEVBUF, M_WAITOK);
diff --git a/sys/dev/syscons/logo/logo_saver.c b/sys/dev/syscons/logo/logo_saver.c
index 81626d5d5bf6..7211db4303de 100644
--- a/sys/dev/syscons/logo/logo_saver.c
+++ b/sys/dev/syscons/logo/logo_saver.c
@@ -65,11 +65,11 @@ logo_blit(video_adapter_t *adp, int x, int y)
{
int d, l, o, p;
int last_origin = -1;
-
+
for (o = 0, p = y * bpsl + x; p > banksize; p -= banksize)
o += banksize;
SET_ORIGIN(adp, o);
-
+
for (d = 0; d < logo_img_size; d += logo_w) {
if (p + logo_w < banksize) {
bcopy(logo_img + d, vid + p, logo_w);
@@ -94,7 +94,7 @@ logo_update(video_adapter_t *adp)
{
static int xpos = 0, ypos = 0;
static int xinc = 1, yinc = 1;
-
+
/* Turn when you hit the edge */
if ((xpos + logo_w + xinc > scrw) || (xpos + xinc < 0))
xinc = -xinc;
@@ -102,7 +102,7 @@ logo_update(video_adapter_t *adp)
yinc = -yinc;
xpos += xinc;
ypos += yinc;
-
+
/* XXX Relies on margin around logo to erase trail */
logo_blit(adp, xpos, ypos);
}
@@ -111,7 +111,7 @@ static int
logo_saver(video_adapter_t *adp, int blank)
{
int pl;
-
+
if (blank) {
/* switch to graphics mode */
if (blanked <= 0) {
@@ -137,7 +137,7 @@ static int
logo_init(video_adapter_t *adp)
{
video_info_t info;
-
+
if (!vidd_get_info(adp, M_VESA_CG800x600, &info)) {
scrmode = M_VESA_CG800x600;
} else if (!vidd_get_info(adp, M_VGA_CG320, &info)) {
@@ -148,10 +148,10 @@ logo_init(video_adapter_t *adp)
SAVER_NAME);
return (ENODEV);
}
-
+
scrw = info.vi_width;
scrh = info.vi_height;
-
+
return (0);
}
diff --git a/sys/dev/syscons/rain/rain_saver.c b/sys/dev/syscons/rain/rain_saver.c
index c71002e55d36..5b3a93dc56d4 100644
--- a/sys/dev/syscons/rain/rain_saver.c
+++ b/sys/dev/syscons/rain/rain_saver.c
@@ -142,7 +142,7 @@ rain_init(video_adapter_t *adp)
{
video_info_t info;
int i;
-
+
if (!vidd_get_info(adp, M_VGA_CG320, &info)) {
scrmode = M_VGA_CG320;
} else {
@@ -151,14 +151,14 @@ rain_init(video_adapter_t *adp)
SAVER_NAME);
return (ENODEV);
}
-
+
scrw = info.vi_width;
scrh = info.vi_height;
/* intialize the palette */
for (i = 1; i < MAX; i++)
rain_pal[BLUE(i)] = rain_pal[BLUE(i - 1)] + INCREMENT;
-
+
return (0);
}
diff --git a/sys/dev/syscons/scgfbrndr.c b/sys/dev/syscons/scgfbrndr.c
index 2dc4f503854e..c2e87361bf76 100644
--- a/sys/dev/syscons/scgfbrndr.c
+++ b/sys/dev/syscons/scgfbrndr.c
@@ -147,7 +147,6 @@ gfb_draw(scr_stat *scp, int from, int count, int flip)
and the number of characters to be displayed...
*/
if (from + count > scp->xsize*scp->ysize) {
-
/*
Calculate the number of characters past the end of the
visible screen...
@@ -177,7 +176,6 @@ gfb_draw(scr_stat *scp, int from, int count, int flip)
all-at-once...
*/
else {
-
/*
Determine the method by which we are to display characters
(are we going to print forwards or backwards?
diff --git a/sys/dev/syscons/schistory.c b/sys/dev/syscons/schistory.c
index 64f662b5a7f4..efb5d5bf6765 100644
--- a/sys/dev/syscons/schistory.c
+++ b/sys/dev/syscons/schistory.c
@@ -299,7 +299,6 @@ sc_hist_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
int error;
switch (cmd) {
-
case CONS_HISTORY: /* set history size */
scp = SC_STAT(tp);
if (*(int *)data <= 0)
diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c
index 03daba3ebfab..a4b467637c2a 100644
--- a/sys/dev/syscons/scmouse.c
+++ b/sys/dev/syscons/scmouse.c
@@ -663,7 +663,6 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
scp = SC_STAT(tp);
switch (cmd) {
-
case CONS_MOUSECTL: /* control mouse arrow */
case OLD_CONS_MOUSECTL:
diff --git a/sys/dev/syscons/scterm-sc.c b/sys/dev/syscons/scterm-sc.c
index de46827b5837..684638f41120 100644
--- a/sys/dev/syscons/scterm-sc.c
+++ b/sys/dev/syscons/scterm-sc.c
@@ -206,7 +206,6 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
sc = scp->sc;
if (tcp->esc == 1) { /* seen ESC */
switch (c) {
-
case '7': /* Save cursor position */
tcp->saved_xpos = scp->xpos;
tcp->saved_ypos = scp->ypos;
@@ -265,7 +264,6 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
}
tcp->num_param = tcp->last_param + 1;
switch (c) {
-
case ';':
if (tcp->num_param < MAX_ESC_PAR)
return;
@@ -552,7 +550,6 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
}
tcp->num_param = tcp->last_param + 1;
switch (c) {
-
case ';':
if (tcp->num_param < MAX_ESC_PAR)
return;
diff --git a/sys/dev/syscons/scvesactl.c b/sys/dev/syscons/scvesactl.c
index 74e7428eefb3..9827476629fc 100644
--- a/sys/dev/syscons/scvesactl.c
+++ b/sys/dev/syscons/scvesactl.c
@@ -61,7 +61,6 @@ vesa_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
scp = SC_STAT(tp);
switch (cmd) {
-
/* generic text modes */
case SW_TEXT_132x25: case SW_TEXT_132x30:
case SW_TEXT_132x43: case SW_TEXT_132x50:
diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c
index f7b66bbf76f6..990c12f8f89d 100644
--- a/sys/dev/syscons/scvgarndr.c
+++ b/sys/dev/syscons/scvgarndr.c
@@ -323,7 +323,7 @@ static const struct mousedata * const mousesmall[] = {
writeb((pos), (uint8_t)(color)); \
} \
} while (0)
-
+
static uint32_t vga_palette32[16] = {
0x000000, 0x0000ad, 0x00ad00, 0x00adad,
0xad0000, 0xad00ad, 0xad5200, 0xadadad,
diff --git a/sys/dev/syscons/scvidctl.c b/sys/dev/syscons/scvidctl.c
index 78c11817dd92..07566e64a212 100644
--- a/sys/dev/syscons/scvidctl.c
+++ b/sys/dev/syscons/scvidctl.c
@@ -491,7 +491,6 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
return ENODEV;
switch (cmd) {
-
case CONS_CURRENTADP: /* get current adapter index */
case FBIO_ADAPTER:
return fb_ioctl(adp, FBIO_ADAPTER, data);
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 70565675fe29..6a389604d3ab 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -845,7 +845,6 @@ sckbdevent(keyboard_t *thiskbd, int event, void *arg)
* the Xaccel-2.1 keyboard hang, but it can't hurt. XXX
*/
while ((c = scgetc(sc, SCGETC_NONBLOCK, NULL)) != NOKEY) {
-
cur_tty = SC_DEV(sc, sc->cur_scp->index);
if (!tty_opened_ns(cur_tty))
continue;
@@ -3275,7 +3274,6 @@ scinit(int unit, int flags)
}
if (!(sc->flags & SC_INIT_DONE) || (adp != sc->adp)) {
-
sc->initial_mode = sc->adp->va_initial_mode;
#ifndef SC_NO_FONT_LOADING
@@ -3800,7 +3798,6 @@ next_code:
/* if scroll-lock pressed allow history browsing */
if (!ISGRAPHSC(scp) && scp->history && scp->status & SLKED) {
-
scp->status &= ~CURSOR_ENABLED;
sc_remove_cursor_image(scp);
diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c
index 6197a50d0d0e..ef851058a6ef 100644
--- a/sys/dev/syscons/sysmouse.c
+++ b/sys/dev/syscons/sysmouse.c
@@ -137,7 +137,6 @@ smdev_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
mousemode_t *mode;
switch (cmd) {
-
case MOUSE_GETHWINFO: /* get device information */
hw = (mousehw_t *)data;
hw->buttons = 10; /* XXX unknown */
diff --git a/sys/dev/syscons/warp/warp_saver.c b/sys/dev/syscons/warp/warp_saver.c
index 6e186edacd3f..b92f95f405b5 100644
--- a/sys/dev/syscons/warp/warp_saver.c
+++ b/sys/dev/syscons/warp/warp_saver.c
@@ -100,7 +100,7 @@ static int
warp_saver(video_adapter_t *adp, int blank)
{
int pl;
-
+
if (blank) {
/* switch to graphics mode */
if (blanked <= 0) {
@@ -128,7 +128,7 @@ warp_init(video_adapter_t *adp)
{
video_info_t info;
int i;
-
+
if (!vidd_get_info(adp, M_VGA_CG320, &info)) {
scrmode = M_VGA_CG320;
} else {
@@ -137,14 +137,14 @@ warp_init(video_adapter_t *adp)
SAVER_NAME);
return (ENODEV);
}
-
+
scrw = info.vi_width;
scrh = info.vi_height;
/* randomize the star field */
for (i = 0; i < STARS; i++)
star[i] = random() % (scrw * scrh);
-
+
return (0);
}