From owner-freebsd-current@FreeBSD.ORG Sun Nov 22 01:51:24 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9FDE1065672 for ; Sun, 22 Nov 2009 01:51:24 +0000 (UTC) (envelope-from dhorn2000@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by mx1.freebsd.org (Postfix) with ESMTP id 609588FC0A for ; Sun, 22 Nov 2009 01:51:24 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id e12so492369fga.13 for ; Sat, 21 Nov 2009 17:51:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=a5WHmVHxO7jWaTZcZbFmohLph66g9kZOa3dsijsMAj8=; b=ouj18RmsoJD+6G1OpTS9PeEiBQ4cgsBsS23ezdjJ03iP1qhHzYToEbKmE/RtAbCN5p exoHzzyw01CM/NWe8bnXiHI0KZaZHOUG+h/u0k6YngnYzwv8UM509O87svsZc9+ibIuC iZzPFwn9k8bpFaOW3R1Q7yIKCoURmwqw7dW10= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=lOwlVnXAMEUu6HJl3ly4YVDk+bb+LpMmehifwGEkR+lHdg/saLOeqq9GwuiyUl18PS /2x84YXj5rIt7EQPJc9nRdQiexewFNdze1G3ih2631FjrOj5mDQPAShjzxWG92QgfcUW 9h7vCRMS42wbwS1YVSc/y19UMMb7kmo0Tcucw= MIME-Version: 1.0 Received: by 10.239.141.155 with SMTP id c27mr334466hba.48.1258854682635; Sat, 21 Nov 2009 17:51:22 -0800 (PST) In-Reply-To: <4B0848EB.4070002@jrv.org> References: <4B0848EB.4070002@jrv.org> Date: Sat, 21 Nov 2009 20:51:22 -0500 Message-ID: <25ff90d60911211751l634c3cb6w8a66ee040e2c7189@mail.gmail.com> From: David Horn To: "James R. Van Artsdalen" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Current Subject: Re: kldstat bug? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 01:51:24 -0000 On Sat, Nov 21, 2009 at 3:09 PM, James R. Van Artsdalen wrote: > amd64, svn 199260, November 13, 2009 > > Is this behavior of kldstat a bug? =A0Some modules found, some not, and > the Id field differs even in success. > > # kldstat > Id Refs Address =A0 =A0 =A0 =A0 =A0 =A0Size =A0 =A0 Name > =A01 =A0 19 0xffffffff80100000 f15ee8 =A0 kernel > =A02 =A0 =A01 0xffffffff81016000 194220 =A0 zfs.ko > =A03 =A0 =A02 0xffffffff811ab000 3928 =A0 =A0 opensolaris.ko > =A04 =A0 =A01 0xffffffff811af000 24560 =A0 =A0geom_mirror.ko > =A05 =A0 =A01 0xffffffff811d4000 9ac0 =A0 =A0 siis.ko > =A06 =A0 =A01 0xffffffff811de000 d0a8 =A0 =A0 ahci.ko > # kldstat -m zfs > Id =A0Refs Name > =A03 =A0 =A01 zfs > # kldstat -m opensolaris > Id =A0Refs Name > =A01 =A0 =A01 opensolaris > # kldstat -m geom_mirror > kldstat: can't find module geom_mirror: No such file or directory > # kldstat -m siis > kldstat: can't find module siis: No such file or directory > # kldstat -m ahci > kldstat: can't find module ahci: No such file or directory > # > If you try using kldstat -v (verbose), you will likely understand a little better. There is a file id (for kernel modules *files* like siis.ko), and there are module ids (for individual modules within the kernel module file). The relationship is not necessarily 1:1, as there can be more than 1 module per kernel module file). For example: 24 1 0xffffffff810a1000 3c13 siis.ko (/boot/kernel/siis.ko) Contains modules: Id Name 440 siis/siisch 441 pci/siis Notice that the kernel module file (siis.ko) has an id of 24, and the modules in that file (siis/siisch and pci/siis) each have there own module id (440 and 441 repectively). If you would do a kldstat -m pci/siis you would be able to find that since the -m flag requires a module name, not a kernel module file name. Yes, module name versus kernel module file name and file id vs module id can cause confusion. Good Luck. ---Dave