From owner-cvs-src@FreeBSD.ORG Thu Dec 29 21:27:10 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4734C16A423; Thu, 29 Dec 2005 21:27:10 +0000 (GMT) (envelope-from netchild@FreeBSD.org) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6890A43D9B; Thu, 29 Dec 2005 21:26:51 +0000 (GMT) (envelope-from netchild@FreeBSD.org) Received: from Andro-Beta.Leidinger.net (p54A5CF88.dip.t-dialin.net [84.165.207.136]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.1/8.13.1) with ESMTP id jBTLNvUh029746; Thu, 29 Dec 2005 22:23:58 +0100 (CET) (envelope-from netchild@FreeBSD.org) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.3/8.13.3) with ESMTP id jBTLQkpp055014; Thu, 29 Dec 2005 22:26:46 +0100 (CET) (envelope-from netchild@FreeBSD.org) Date: Thu, 29 Dec 2005 22:26:45 +0100 From: Alexander Leidinger To: Nate Lawson Message-ID: <20051229222645.05311b1f@Magellan.Leidinger.net> In-Reply-To: <43B4385D.9030206@root.org> References: <20051229183552.205C316A432@hub.freebsd.org> <43B4385D.9030206@root.org> Organization: FreeBSD X-Mailer: Sylpheed-Claws 1.9.100 (GTK+ 2.8.9; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/usb ums.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2005 21:27:10 -0000 On Thu, 29 Dec 2005 11:26:21 -0800 Nate Lawson wrote: > > Index: src/sys/dev/usb/ums.c > > diff -u src/sys/dev/usb/ums.c:1.79 src/sys/dev/usb/ums.c:1.80 > > --- src/sys/dev/usb/ums.c:1.79 Thu Dec 29 17:44:40 2005 > > +++ src/sys/dev/usb/ums.c Thu Dec 29 18:35:28 2005 > > @@ -425,7 +425,7 @@ > > struct ums_softc *sc = addr; > > u_char *ibuf; > > int dx, dy, dz, dt; > > - u_char buttons = 0; > > + int buttons = 0; > > int i; > > > > #define UMS_BUT(i) ((i) < 3 ? (((i) + 2) % 3) : (i)) > > I think the UMS_BUT macro operates on only 2 bits. Are you sure that's > still right? The UMS_BUT macro in NetBSD is different, but I don't know if this is because of the uhidevs changes (which we don't have) or not. The change in NetBSD only changed the MAX_BUTTONS define, not the UMS_BUT macro. I also don't see where it only operates on 2 bits (BTW.: MAX_BUTTONS was changed from decimal 7 to decimal 31)... if I rewrite it as a function it looks like: int ums_but(int i) { if (i < 3) { return (i + 2) % 3; } else { return i; } } Or did I miscounted the parenthesis? Bye, Alexander. -- Give a man a fish and you feed him for a day; teach him to use the Net and he won't bother you for weeks. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7