From owner-svn-src-head@freebsd.org Wed Jun 15 21:50:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56388A317CC; Wed, 15 Jun 2016 21:50:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3817D13BC; Wed, 15 Jun 2016 21:50:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2D8B8B94C; Wed, 15 Jun 2016 17:50:34 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301931 - head/tools/tools/decioctl Date: Wed, 15 Jun 2016 14:12:26 -0700 Message-ID: <13453684.1tT3vNfOUf@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201606152101.u5FL1reW011224@repo.freebsd.org> References: <201606152101.u5FL1reW011224@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 15 Jun 2016 17:50:34 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 21:50:35 -0000 On Wednesday, June 15, 2016 09:01:53 PM John Baldwin wrote: > Author: jhb > Date: Wed Jun 15 21:01:53 2016 > New Revision: 301931 > URL: https://svnweb.freebsd.org/changeset/base/301931 > > Log: > Add a tool to decode ioctl commands. > > One or more ioctl command values can be passed as arguments on the command > line. For each value, the command is broken down into it's components > (direction, group, number, and length). In addition, if a command has a > known name it is output via sysdecode_ioctlname(). > > Reviewed by: kib, emaste, avg > Approved by: re (gjb) > Differential Revision: https://reviews.freebsd.org/D6851 I've had a version of this in a private tree of utilities for several years. I added the sysdecode stuff yesterday though now that it's easy to do so. Sample output: % ./decioctl 0xc4d01902 0xc4e01902 0x4004667f command : dir group num len name 0xc4d01902: INOUT 0x19 2 1232 CAMIOCOMMAND 0xc4e01902: INOUT 0x19 2 1248 0x4004667f: OUT 'f' 127 4 FIONREAD -- John Baldwin