diff options
Diffstat (limited to 'usr/src/uts/common/io/vuidmice/vuidm4p.c')
-rw-r--r-- | usr/src/uts/common/io/vuidmice/vuidm4p.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr/src/uts/common/io/vuidmice/vuidm4p.c b/usr/src/uts/common/io/vuidmice/vuidm4p.c index bb451b0508..9af020b4af 100644 --- a/usr/src/uts/common/io/vuidmice/vuidm4p.c +++ b/usr/src/uts/common/io/vuidmice/vuidm4p.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -32,6 +31,7 @@ #include <sys/param.h> #include <sys/stream.h> +#include <sys/strsun.h> #include <sys/vuid_event.h> #include <sys/vuidmice.h> @@ -99,7 +99,7 @@ vuidm4p(queue_t *const qp, mblk_t *mp) unsigned char *bufp; bufp = mp->b_rptr; - r = mp->b_wptr - mp->b_rptr; + r = MBLKL(mp); for (r--; r >= 0; r--) { code = *bufp++; @@ -134,7 +134,7 @@ vuidm4p(queue_t *const qp, mblk_t *mp) /* Get the new state for the LEFT & RIGHT Button */ STATEP->buttons |= - (code & (MOUSE_BUTTON_L | MOUSE_BUTTON_R)); + (code & (MOUSE_BUTTON_L | MOUSE_BUTTON_R)); /* * bits 0 & 1 are bits 6 & 7 of X value @@ -170,7 +170,7 @@ vuidm4p(queue_t *const qp, mblk_t *mp) STATEP->state = MOUSE_DELTA_Y; STATEP->buttons |= - (STATEP->oldbuttons & MOUSE_BUTTON_M); + (STATEP->oldbuttons & MOUSE_BUTTON_M); /* * If we can peek at the next two mouse characters, |