From owner-freebsd-current@FreeBSD.ORG Tue Nov 15 21:17:32 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1ABFD1065675 for ; Tue, 15 Nov 2011 21:17:32 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.c2i.net [212.247.154.2]) by mx1.freebsd.org (Postfix) with ESMTP id A0DA78FC08 for ; Tue, 15 Nov 2011 21:17:31 +0000 (UTC) X-T2-Spam-Status: No, hits=2.5 required=5.0 tests=ALL_TRUSTED, BAYES_99 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 205925778; Tue, 15 Nov 2011 22:17:29 +0100 From: Hans Petter Selasky To: Marcus von Appen Date: Tue, 15 Nov 2011 22:14:43 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <4EC2C757.4060303@FreeBSD.org> <20111115205406.GB1922@medusa.sysfault.org> In-Reply-To: <20111115205406.GB1922@medusa.sysfault.org> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?iso-8859-1?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?iso-8859-1?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201111152214.43361.hselasky@c2i.net> Cc: freebsd-current@freebsd.org Subject: Re: uhid(4) and report structures X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2011 21:17:32 -0000 On Tuesday 15 November 2011 21:54:06 Marcus von Appen wrote: > struct usb_ctl_report { > int ucr_report; > u_char ucr_data[1024]; > }; Hi, Before the descriptor length was limited to 1024 bytes. Now it is limited to 65535 bytes, which is the USB maximum for control endpoints. Having a buffer this large by default does not make sense, so a pointer and length is the best solution. The application also sometimes know about what descriptor size(s) it expects. --HPS