summaryrefslogtreecommitdiffstats
path: root/sys/dev/mse
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1996-12-19 18:33:13 +0000
committerjoerg <joerg@FreeBSD.org>1996-12-19 18:33:13 +0000
commit91cee613584939787089a29b7dc60a256d402fdc (patch)
tree59c565aff99ceabdce2ecdaea4cc1b3603b15b24 /sys/dev/mse
parente18fda9e89259585317ee356c6d3cdbbf6da2caa (diff)
downloadFreeBSD-src-91cee613584939787089a29b7dc60a256d402fdc.zip
FreeBSD-src-91cee613584939787089a29b7dc60a256d402fdc.tar.gz
Test in mseopen() whether the device has been configured at all, and
refuse the open intent with ENXIO otherwise. Closes PR # bin/2226. Reviewed by: bde
Diffstat (limited to 'sys/dev/mse')
-rw-r--r--sys/dev/mse/mse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c
index b54417e..50f04be 100644
--- a/sys/dev/mse/mse.c
+++ b/sys/dev/mse/mse.c
@@ -11,7 +11,7 @@
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
- * $Id: mse.c,v 1.27 1996/06/08 09:37:51 bde Exp $
+ * $Id: mse.c,v 1.28 1996/09/06 23:07:51 phk Exp $
*/
/*
* Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
@@ -111,6 +111,7 @@ static struct mse_softc {
#define MSESC_WANT 0x2
/* and Mouse Types */
+#define MSE_NONE 0 /* don't move this! */
#define MSE_LOGITECH 0x1
#define MSE_ATIINPORT 0x2
#define MSE_LOGI_SIG 0xA5
@@ -263,6 +264,8 @@ mseopen(dev, flags, fmt, p)
if (MSE_UNIT(dev) >= NMSE)
return (ENXIO);
sc = &mse_sc[MSE_UNIT(dev)];
+ if (sc->sc_mousetype == MSE_NONE)
+ return (ENXIO);
if (sc->sc_flags & MSESC_OPEN)
return (EBUSY);
sc->sc_flags |= MSESC_OPEN;
OpenPOWER on IntegriCloud