From owner-freebsd-current@FreeBSD.ORG Wed Sep 8 19:19:52 2010 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 EEF0910656A6 for ; Wed, 8 Sep 2010 19:19:52 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 89C128FC12 for ; Wed, 8 Sep 2010 19:19:52 +0000 (UTC) Received: by wyb33 with SMTP id 33so458536wyb.13 for ; Wed, 08 Sep 2010 12:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=5dyT/HocRCo5+B7UFmquZtet19Ag2aW5w2/Li0pmaxo=; b=OQf4/RXGqVbk++A2gRHTeCLsw4yaonWte2hodu97ZyTBWsyo/ixMrPV2GNzlSx31Oq 5he68Sddc7REfTVdJKI0+t44VkwwS7Z/8nhQfn+beVrsAPQPHhbblLUVNBbZ1gOqRzkq gXvNNuHT7OZ9s92pK4EIrbEdmmR930Wn5AUZM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=aUrcF+CrUD4Q1QynC2ig0hhfeUtsEP/6eSghQoWxrG65Luj8jxRm59essvt6uyEQPi H4RcdXEHTpLCuEOLTWkMAJezdXLTTUEJXU6uJyz7bDn0NwXRn7cOWIwXKL51EJJJw78e 4GZOTZ6dO3HHGh3V/KtQAZ1S770W8KeiPNo9o= MIME-Version: 1.0 Received: by 10.227.156.12 with SMTP id u12mr26278wbw.213.1283972271016; Wed, 08 Sep 2010 11:57:51 -0700 (PDT) Received: by 10.216.27.204 with HTTP; Wed, 8 Sep 2010 11:57:50 -0700 (PDT) Date: Wed, 8 Sep 2010 11:57:50 -0700 Message-ID: From: Maksim Yevmenkin To: FreeBSD Current Content-Type: text/plain; charset=ISO-8859-1 Subject: silly libusbhid question 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: Wed, 08 Sep 2010 19:19:53 -0000 hello, [trying current@ first to get wider audience :)] so, i have a somewhat silly question about libusbhid. please consider the following code hid_data_t d; hid_item_t h; for (d = hid_start_parse(desc, 1 << hid_input, -1); hid_get_item(d, &h) > 0; ) { ... } hid_end_parse(d); the idea is/was to parse and iterate over hid descriptor desc in a such a way that only "hid_input" items are returned. as it turns out, this code will also pick up "hid_collection" items as well, i.e. "h.kind" is set to "hid_collection". is this a bug or a feature? thanks, max