From owner-cvs-all@FreeBSD.ORG Wed Oct 31 01:08:57 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C940316A41A; Wed, 31 Oct 2007 01:08:57 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from heff.fud.org.nz (203-109-251-39.static.bliink.ihug.co.nz [203.109.251.39]) by mx1.freebsd.org (Postfix) with ESMTP id 5C8A613C4B0; Wed, 31 Oct 2007 01:08:57 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: by heff.fud.org.nz (Postfix, from userid 1001) id 2DB9656EB; Wed, 31 Oct 2007 13:49:56 +1300 (NZDT) Date: Wed, 31 Oct 2007 13:49:56 +1300 From: Andrew Thompson To: John Birrell Message-ID: <20071031004956.GA27943@heff.fud.org.nz> References: <200710220413.l9M4D8g3016327@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200710220413.l9M4D8g3016327@repoman.freebsd.org> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/sys kldstat.2 src/sbin/kldstat kldstat.c src/sys/kern kern_linker.c src/sys/sys linker.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2007 01:08:57 -0000 On Mon, Oct 22, 2007 at 04:12:58AM +0000, John Birrell wrote: > jb 2007-10-22 04:12:57 UTC > > FreeBSD src repository > > Modified files: > lib/libc/sys kldstat.2 > sbin/kldstat kldstat.c > sys/kern kern_linker.c > sys/sys linker.h > Log: > Add the full module path name to the kld_file_stat structure > for kldstat(2). > > This allows libdtrace to determine the exact file from which > a kernel module was loaded without having to guess. > > The kldstat(2) API is versioned with the size of the > kld_file_stat structure, so this change creates version 2. > > Add the pathname to the verbose output of kldstat(8) too. This change didnt actually add to the verbose output of kldstat but is always printed, # kldstat Id Refs Address Size Name 1 13 0xc0400000 940ed4 kernel (/boot/kernel/kernel) 2 1 0xc0d41000 d4f0 if_ipw.ko (/boot/kernel/if_ipw.ko) 3 1 0xc0d4f000 1088c if_iwi.ko (/boot/kernel/if_iwi.ko) 4 1 0xc0d60000 6b2ac acpi.ko (/boot/kernel/acpi.ko) 5 1 0xc56b1000 30000 iwi_bss.ko (/boot/kernel/iwi_bss.ko) I would prefer that it did in fact go under verbose. > > MFC: 3 days > > #include > -__FBSDID("$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sbin/kldstat/kldstat.c,v 1.19 2005/09/24 08:20:45 pjd Exp $"); > +__FBSDID("$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sbin/kldstat/kldstat.c,v 1.20 2007/10/22 04:12:57 jb Exp $"); > > #include > #include > @@ -60,9 +60,9 @@ static void printfile(int fileid, int ve > if (kldstat(fileid, &stat) < 0) > warn("can't stat file id %d", fileid); > else > - printf("%2d %4d %p %-8jx %s\n", > + printf("%2d %4d %p %-8jx %s (%s)\n", > stat.id, stat.refs, stat.address, (uintmax_t)stat.size, > - stat.name); > + stat.name, stat.pathname); > > if (verbose) { > printf("\tContains modules:\n");