Skip to contentSkip to conversation

Documentation of module parameters.

DISCUSSION Chris Kloiber 4 participants 5 messages Apr 17, 2001 – Apr 20, 2001

lore
Share & tools
lore
#0 lore raw

I was recently looking for a single location where all the possible module parameters for the linux kernel was located.

I figured I would look at the source first, hoping that each module maintaier would clearly document at the beginning of each .c file all of the parameters his or her module can accept. Sadly, that's not always the case. Some modules are well documented, others are a complete mystery. If I was a programmer myself, I might be able to determine from the code itself what parameters are possible, but that's not one of my talents. Could any and all of you please take the time to document your code, and keep the comments up to date when it changes? I think that in the source code itself is the best place for such documentation, as you have the chance to fix the docs with every patch, and the source is always included in each distribution. Then from the source can any exterior documentation be gleaned. Those of us who don't speak C would really appreciate it.

Thanks In Advance.

Chris Kloiber

#1 lore raw
Quoted 2 lines · Chris Kloiber

I was recently looking for a single location where all the possible module parameters for the linux kernel was located.

Hear him. A DocBook document would be a dandy place for this to get pulled together, too.

Quoted 17 lines

I figured I would look at the source first, hoping that each module maintaier would clearly document at the beginning of each .c file all of the parameters his or her module can accept. Sadly, that's not always the case. Some modules are well documented, others are a complete mystery. If I was a programmer myself, I might be able to determine from the code itself what parameters are possible, but that's not one of my talents. Could any and all of you please take the time to document your code, and keep the comments up to date when it changes? I think that in the source code itself is the best place for such documentation, as you have the chance to fix the docs with every patch, and the source is always included in each distribution. Then from the source can any exterior documentation be gleaned. Those of us who don't speak C would really appreciate it.

Thanks In Advance.

Chris Kloiber

Signature · 1 line
/Jonathan Lundell.
#2 lore raw
In reply to Chris Kloiber
Quoted 6 lines · Jonathan Lundell
Quoted 2 lines · Chris Kloiber

I was recently looking for a single location where all the possible module parameters for the linux kernel was located.

Hear him. A DocBook document would be a dandy place for this to get pulled together, too.

good idea. One could just grab all the MODULE_PARM_DESC out of all sourcefiles, look to which module the particular sourcefile belongs (looking into Makefile?), and create a Documentation/DocBook/... document out of it.

Sounds like something doable, only somebody needs to get around doing it. Any volunteers?

Quoted 2 lines
Signature · 1 line
/Jonathan Lundell.
Signature · 5 lines
Live long and prosper
- Harald Welte / [email protected]                http://www.gnumonks.org
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M- 
V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)
#3 lore raw
In reply to Chris Kloiber
Quoted 8 lines · Harald Welte
Quoted 6 lines · Jonathan Lundell
Quoted 2 lines · Chris Kloiber

I was recently looking for a single location where all the possible module parameters for the linux kernel was located.

Hear him. A DocBook document would be a dandy place for this to get pulled together, too.

Quoted 6 lines

good idea. One could just grab all the MODULE_PARM_DESC out of all sourcefiles, look to which module the particular sourcefile belongs (looking into Makefile?), and create a Documentation/DocBook/... document out of it.

Sounds like something doable, only somebody needs to get around doing it. Any volunteers?

it sounded like a challenge. this might help someone who can't be bothered extracting all the data by hand. it spits it out in tab delimited form, as sanely as i could manage in 5 minutes.

j.

Signature · 1 line
"Bobby, jiggle Grandpa's rat so it looks alive, please" -- gary larson

#!/bin/sh

# john slee <[email protected]>
# Sat Apr 21 03:17:55 EST 2001
# quick and dirty.  run from a kernel source dir somewhere.
find . -name "*.c" | xargs egrep 'MODULE_DESCRIPTION|MODULE_PARM_DESC' \
	| sed '/#undef/d; s/^\.\///; s/[:()]/	/g; s/[";]//g; /MODULE_PARM_DESC/s/,[ ]*/	/; /^[	 ]*$/d'
#4 lore raw
In reply to Chris Kloiber
Quoted 1 line · john slee

it sounded like a challenge. this might help someone who can't be

and it might be even more helpful if it didnt appear with a stupid mimetype.

attempt #2

Signature · 1 line
"Bobby, jiggle Grandpa's rat so it looks alive, please" -- gary larson

#!/bin/sh

# john slee <[email protected]>
# Sat Apr 21 03:17:55 EST 2001
# quick and dirty.  run from a kernel source dir somewhere.
find . -name "*.c" | xargs egrep 'MODULE_DESCRIPTION|MODULE_PARM_DESC' \
	| sed '/#undef/d; s/^\.\///; s/[:()]/	/g; s/[";]//g; /MODULE_PARM_DESC/s/,[ ]*/	/; /^[	 ]*$/d'