From owner-svn-src-head@freebsd.org Tue Jul 19 18:21:19 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 3BA91B9D580; Tue, 19 Jul 2016 18:21:19 +0000 (UTC) (envelope-from ken@freebsd.org) Received: from mithlond.kdm.org (mithlond.kdm.org [96.89.93.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "A1-33714", Issuer "A1-33714" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 15EC61BBF; Tue, 19 Jul 2016 18:21:18 +0000 (UTC) (envelope-from ken@freebsd.org) Received: from [10.0.0.27] (mbp2013-wired.int.kdm.org [10.0.0.27]) (authenticated bits=0) by mithlond.kdm.org (8.15.2/8.14.9) with ESMTPSA id u6JI0BvL093581 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Jul 2016 14:00:12 -0400 (EDT) (envelope-from ken@freebsd.org) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r297023 - head/sbin/kldstat From: Ken Merry In-Reply-To: <201603181449.u2IEnCeN071630@repo.freebsd.org> Date: Tue, 19 Jul 2016 14:00:11 -0400 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201603181449.u2IEnCeN071630@repo.freebsd.org> To: Julian Elischer X-Mailer: Apple Mail (2.3124) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mithlond.kdm.org [96.89.93.250]); Tue, 19 Jul 2016 14:00:12 -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: Tue, 19 Jul 2016 18:21:19 -0000 > On Mar 18, 2016, at 10:49 AM, Julian Elischer = wrote: >=20 > Author: julian > Date: Fri Mar 18 14:49:11 2016 > New Revision: 297023 > URL: https://svnweb.freebsd.org/changeset/base/297023 >=20 > Log: > Add the ability to print out ht emodule specific information in = likely formats. > Among other things this gives us the ability to find outthe syscall = number of a dynamically loaded syscall that has a dynamicly allocated = vector number. >=20 > MFC after: 1 week > Sponsored by: Panzura inc. >=20 > Modified: > head/sbin/kldstat/kldstat.8 > head/sbin/kldstat/kldstat.c >=20 > Modified: head/sbin/kldstat/kldstat.8 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sbin/kldstat/kldstat.8 Fri Mar 18 13:32:37 2016 = (r297022) > +++ head/sbin/kldstat/kldstat.8 Fri Mar 18 14:49:11 2016 = (r297023) > @@ -36,10 +36,12 @@ > .Op Fl h > .Op Fl q > .Op Fl v > +.Op Fl d > .Op Fl i Ar id > .Op Fl n Ar filename > .Nm > .Op Fl q > +.Op Fl d > .Op Fl m Ar modname > .Sh DESCRIPTION > The > @@ -54,6 +56,8 @@ Display the size field in a human-readab > instead of hex values. > .It Fl v > Be more verbose. > +.It Fl d > +Show the module specific data (as int, unsigned int and unsigned = long) > .It Fl i Ar id > Display the status of only the file with this ID. > .It Fl n Ar filename >=20 > Modified: head/sbin/kldstat/kldstat.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sbin/kldstat/kldstat.c Fri Mar 18 13:32:37 2016 = (r297022) > +++ head/sbin/kldstat/kldstat.c Fri Mar 18 14:49:11 2016 = (r297023) > @@ -36,19 +36,28 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include >=20 > #define POINTER_WIDTH ((int)(sizeof(void *) * 2 + 2)) >=20 > +static int showdata =3D 0; > + > static void > printmod(int modid) > { > struct module_stat stat; >=20 > + bzero(&stat, sizeof(stat)); > stat.version =3D sizeof(struct module_stat); > if (modstat(modid, &stat) < 0) > warn("can't stat module id %d", modid); > else > - printf("\t\t%2d %s\n", stat.id, stat.name); > + if (showdata) { > + printf("\t\t%2d %s (%d, %u, 0x%lx)\n", stat.id, stat.name,=20= > + stat.data.intval, stat.data.uintval, = stat.data.ulongval); > + } else { > + printf("\t\t%2d %s\n", stat.id, stat.name); > + } > } >=20 > static void > @@ -88,8 +97,8 @@ printfile(int fileid, int verbose, int h > static void > usage(void) > { > - fprintf(stderr, "usage: kldstat [-h] [-q] [-v] [-i id] [-n = filename]\n"); > - fprintf(stderr, " kldstat [-q] [-m modname]\n"); > + fprintf(stderr, "usage: kldstata[-d] [-h] [-q] [-v] [-i id] [-n = filename]\n"); > + fprintf(stderr, " kldstat [-d] [-q] [-m modname]\n=E2=80=9D);= Looks like there is a typo in the usage. Ken=