summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-10-05 18:34:44 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-10-05 18:34:44 +0000
commite5ba6607d3ff92fc453a74cd7c8273b752b80630 (patch)
tree33bec94a5473b53b7b253992823f2f5c0afc91c5 /sys/arch
parent94287c0feaa128414197401aa3b12e97e70bc06c (diff)
If attaching a wsdisplay console causes a font switch, do not update the PROM
view of the cursor position, so that it comes back to a correct location when the system is shut down.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc/dev/fb.c12
-rw-r--r--sys/arch/sparc64/dev/fb.c12
2 files changed, 18 insertions, 6 deletions
diff --git a/sys/arch/sparc/dev/fb.c b/sys/arch/sparc/dev/fb.c
index 16514738bff..54b7905a0b4 100644
--- a/sys/arch/sparc/dev/fb.c
+++ b/sys/arch/sparc/dev/fb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fb.c,v 1.26 2003/06/28 17:05:33 miod Exp $ */
+/* $OpenBSD: fb.c,v 1.27 2003/10/05 18:34:42 miod Exp $ */
/* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */
/*
@@ -353,9 +353,15 @@ fbwscons_console_init(struct sunfb *sf, struct wsscreen_descr *wsc, int row,
/* assume last row */
sf->sf_ro.ri_crow = sf->sf_ro.ri_rows - 1;
} else {
+ /*
+ * If we force the display row, this is because the screen
+ * has been cleared or the font has been changed.
+ * In this case, choose not to keep pointers to the PROM
+ * cursor position, as the values are likely to be inaccurate
+ * upon shutdown...
+ */
+ sf->sf_crowp = sf->sf_ccolp = NULL;
sf->sf_ro.ri_crow = row;
- if (sf->sf_crowp != NULL)
- *sf->sf_crowp = row;
}
/*
diff --git a/sys/arch/sparc64/dev/fb.c b/sys/arch/sparc64/dev/fb.c
index b0fdacf7079..8c09b2d4fc6 100644
--- a/sys/arch/sparc64/dev/fb.c
+++ b/sys/arch/sparc64/dev/fb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fb.c,v 1.3 2003/06/28 14:26:17 miod Exp $ */
+/* $OpenBSD: fb.c,v 1.4 2003/10/05 18:34:43 miod Exp $ */
/* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */
/*
@@ -179,9 +179,15 @@ fbwscons_console_init(struct sunfb *sf, struct wsscreen_descr *wsc, int row,
/* assume last row */
sf->sf_ro.ri_crow = sf->sf_ro.ri_rows - 1;
} else {
+ /*
+ * If we force the display row, this is because the screen
+ * has been cleared or the font has been changed.
+ * In this case, choose not to keep pointers to the PROM
+ * cursor position, as the values are likely to be inaccurate
+ * upon shutdown...
+ */
+ sf->sf_crowp = sf->sf_ccolp = NULL;
sf->sf_ro.ri_crow = row;
- if (sf->sf_crowp != NULL)
- *sf->sf_crowp = row;
}
/*