From owner-svn-src-all@FreeBSD.ORG Thu May 24 04:24:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B457E106566B; Thu, 24 May 2012 04:24:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 856958FC12; Thu, 24 May 2012 04:24:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4O4OIqq015093; Thu, 24 May 2012 04:24:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4O4OI6A015089; Thu, 24 May 2012 04:24:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205240424.q4O4OI6A015089@svn.freebsd.org> From: Alexander Motin Date: Thu, 24 May 2012 04:24:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235881 - stable/8/usr.bin/usbhidctl 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: Thu, 24 May 2012 04:24:18 -0000 Author: mav Date: Thu May 24 04:24:17 2012 New Revision: 235881 URL: http://svn.freebsd.org/changeset/base/235881 Log: MFC r235519: Add support for -z option for reading operations. It allows to not request current values from device, but only receive changes. Sponsored by: iXsystems, Inc. Modified: stable/8/usr.bin/usbhidctl/usbhid.c stable/8/usr.bin/usbhidctl/usbhidctl.1 Directory Properties: stable/8/usr.bin/usbhidctl/ (props changed) Modified: stable/8/usr.bin/usbhidctl/usbhid.c ============================================================================== --- stable/8/usr.bin/usbhidctl/usbhid.c Thu May 24 04:23:06 2012 (r235880) +++ stable/8/usr.bin/usbhidctl/usbhid.c Thu May 24 04:24:17 2012 (r235881) @@ -189,11 +189,11 @@ usage(void) fprintf(stderr, "usage: %s -f device " - "[-l] [-n] [-r] [-t tablefile] [-v] [-x] name ...\n", + "[-l] [-n] [-r] [-t tablefile] [-v] [-x] [-z] name ...\n", getprogname()); fprintf(stderr, " %s -f device " - "[-l] [-n] [-r] [-t tablefile] [-v] [-x] -a\n", + "[-l] [-n] [-r] [-t tablefile] [-v] [-x] [-z] -a\n", getprogname()); fprintf(stderr, " %s -f device " @@ -311,7 +311,7 @@ dumpdata(int f, report_desc_t rd, int lo u_char *dbuf; enum hid_kind kind; - kind = 0; + kind = zflag ? 3 : 0; rid = -1; use_rid = !!hid_get_report_id(f); do { Modified: stable/8/usr.bin/usbhidctl/usbhidctl.1 ============================================================================== --- stable/8/usr.bin/usbhidctl/usbhidctl.1 Thu May 24 04:23:06 2012 (r235880) +++ stable/8/usr.bin/usbhidctl/usbhidctl.1 Thu May 24 04:24:17 2012 (r235881) @@ -54,6 +54,7 @@ .Op Fl l .Op Fl v .Op Fl x +.Op Fl z .Fl a .Nm .Fl f Ar device @@ -62,6 +63,7 @@ .Op Fl n .Op Fl v .Op Fl x +.Op Fl z .Ar item ... .Nm .Fl f Ar device @@ -106,9 +108,8 @@ Only 'output' and 'feature' kinds can be .It Fl x Dump data in hexadecimal as well as decimal. .It Fl z -Reset reports to zero before processing -.Fl w -arguments. If not specified, current values will be requested from device. +Reset reports to zero before processing other arguments. +If not specified, current values will be requested from device. .El .Sh SYNTAX .Nm