From owner-svn-src-all@FreeBSD.ORG Fri Feb 27 15:30:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EED11106564A; Fri, 27 Feb 2009 15:30:42 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD7A48FC19; Fri, 27 Feb 2009 15:30:42 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1RFUggJ074101; Fri, 27 Feb 2009 15:30:42 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1RFUgP1074100; Fri, 27 Feb 2009 15:30:42 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200902271530.n1RFUgP1074100@svn.freebsd.org> From: Andrew Thompson Date: Fri, 27 Feb 2009 15:30:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189108 - head/lib/libusbhid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2009 15:30:43 -0000 Author: thompsa Date: Fri Feb 27 15:30:42 2009 New Revision: 189108 URL: http://svn.freebsd.org/changeset/base/189108 Log: Fix HID_COMPAT7 handling around the USB_GET_REPORT_DESC ioctl. Submitted by: daichi Pointy hat: me Modified: head/lib/libusbhid/descr.c Modified: head/lib/libusbhid/descr.c ============================================================================== --- head/lib/libusbhid/descr.c Fri Feb 27 15:25:47 2009 (r189107) +++ head/lib/libusbhid/descr.c Fri Feb 27 15:30:42 2009 (r189108) @@ -85,13 +85,15 @@ hid_get_report_desc(int fd) /* get actual length first */ ugd.ugd_data = NULL; ugd.ugd_maxlen = 65535; -#ifdef HID_COMPAT7 if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) { +#ifdef HID_COMPAT7 /* could not read descriptor */ /* try FreeBSD 7 compat code */ return (hid_get_report_desc_compat7(fd)); - } +#else + return (NULL); #endif + } /* * NOTE: The kernel will return a failure if