From 0690c6fe581e5fec1e8044bcac68978c0e8d09a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Tue, 25 Nov 1997 12:44:44 +0000 Subject: [PATCH] Move the hardware currsor off screen when getting back from an unknown mode. Fix warning on uninitialized var. --- sys/dev/syscons/syscons.c | 11 +++++++++-- sys/i386/isa/syscons.c | 11 +++++++++-- sys/isa/syscons.c | 11 +++++++++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 55c38f651c6f..43c62ad260e5 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.238 1997/11/07 09:20:32 phk Exp $ + * $Id: syscons.c,v 1.239 1997/11/21 11:37:05 yokota Exp $ */ #include "sc.h" @@ -925,7 +925,7 @@ int scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) { int error; - u_int i; + u_int i = 0; struct tty *tp; scr_stat *scp; u_short *usp; @@ -1450,6 +1450,13 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) copy_font(LOAD, FONT_16, font_16); load_palette(palette); } + + /* move hardware cursor out of the way */ + outb(crtc_addr, 14); + outb(crtc_addr + 1, 0xff); + outb(crtc_addr, 15); + outb(crtc_addr + 1, 0xff); + /* FALL THROUGH */ case KD_TEXT1: /* switch to TEXT (known) mode */ diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c index 55c38f651c6f..43c62ad260e5 100644 --- a/sys/i386/isa/syscons.c +++ b/sys/i386/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.238 1997/11/07 09:20:32 phk Exp $ + * $Id: syscons.c,v 1.239 1997/11/21 11:37:05 yokota Exp $ */ #include "sc.h" @@ -925,7 +925,7 @@ int scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) { int error; - u_int i; + u_int i = 0; struct tty *tp; scr_stat *scp; u_short *usp; @@ -1450,6 +1450,13 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) copy_font(LOAD, FONT_16, font_16); load_palette(palette); } + + /* move hardware cursor out of the way */ + outb(crtc_addr, 14); + outb(crtc_addr + 1, 0xff); + outb(crtc_addr, 15); + outb(crtc_addr + 1, 0xff); + /* FALL THROUGH */ case KD_TEXT1: /* switch to TEXT (known) mode */ diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c index 55c38f651c6f..43c62ad260e5 100644 --- a/sys/isa/syscons.c +++ b/sys/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.238 1997/11/07 09:20:32 phk Exp $ + * $Id: syscons.c,v 1.239 1997/11/21 11:37:05 yokota Exp $ */ #include "sc.h" @@ -925,7 +925,7 @@ int scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) { int error; - u_int i; + u_int i = 0; struct tty *tp; scr_stat *scp; u_short *usp; @@ -1450,6 +1450,13 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) copy_font(LOAD, FONT_16, font_16); load_palette(palette); } + + /* move hardware cursor out of the way */ + outb(crtc_addr, 14); + outb(crtc_addr + 1, 0xff); + outb(crtc_addr, 15); + outb(crtc_addr + 1, 0xff); + /* FALL THROUGH */ case KD_TEXT1: /* switch to TEXT (known) mode */