mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Justin Piszcz <jpiszcz@lucidpixels.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: modinfo <modulename> question
Date: Wed, 5 Sep 2007 10:09:16 -0700	[thread overview]
Message-ID: <20070905100916.f8e31bff.randy.dunlap@oracle.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0709051232440.22864@p34.internal.lan>

On Wed, 5 Sep 2007 12:34:13 -0400 (EDT) Justin Piszcz wrote:

> Is there anyway to get/see what parameters were passed to a kernel module? 
> Running modinfo -p <module> will show the defaults, but for example, st, 
> the scsi tape driver, is there a way to see what it is currently using? I 
> know in dmesg it shows this when you load it initially (but if say dmesg 
> has been cleared or the buffer was filled up)?

If a "module" (whether built as a loadable module or builtin to the
kernel image) uses module_param() with a permission (or mode) field
that allows reading that parameter, then the parameter will show up
in /sys/module/<module>/parameters/<parameter>.

E.g., drivers/scsi/sg has these parameters listed and are readable
by anyone:

-rw-r--r-- 1 root root 4096 Sep  5 10:07 allow_dio
-rw-r--r-- 1 root root 4096 Sep  5 10:07 def_reserved_size
-rw-r--r-- 1 root root 4096 Sep  5 10:07 scatter_elem_sz

However, the st driver uses 0 for permission (mode), so none of its
parameters is visible.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

  reply	other threads:[~2007-09-05 17:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-05 16:34 Justin Piszcz
2007-09-05 17:09 ` Randy Dunlap [this message]
2007-09-05 17:17 ` Andreas Schwab
2007-09-05 17:31   ` Justin Piszcz
2007-09-06 12:03     ` Jan Engelhardt
2007-09-05 19:55 ` Chris Snook
     [not found] <9065c-7jN-17@gated-at.bofh.it>
2007-09-05 18:02 ` Bodo Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070905100916.f8e31bff.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=jpiszcz@lucidpixels.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome