From: Erik Mouw <erik@harddisk-recovery.com>
To: "leo.liang.chen@gmail.com" <leo.liang.chen@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Newbie questions on the kernel programming
Date: Mon, 19 Jun 2006 11:42:46 +0200 [thread overview]
Message-ID: <20060619094245.GA13787@harddisk-recovery.com> (raw)
In-Reply-To: <1150709412.051278.100900@g10g2000cwb.googlegroups.com>
On Mon, Jun 19, 2006 at 09:30:12AM -0000, leo.liang.chen@gmail.com wrote:
> I am learning linux kernel programming starting from "The Linux Kernel
> Module Programming Guide"(http://www.faqs.org/docs/kernel/) . I have
> background in Windows DDK, but I am confused on the following topics.
> Can anyone here give me some hints.
>
> 1) MODULE_PARM() macro (http://www.faqs.org/docs/kernel/x350.html)
> static short int myshort = 1;
> static int myint = 420;
> static long int mylong = 9999;
> static char *mystring = "blah";
>
> MODULE_PARM (myshort, "h");
> MODULE_PARM (myint, "i");
> MODULE_PARM (mylong, "l");
> MODULE_PARM (mystring, "s");
Note that this is an obsolete syntax, it changed in 2.6 like this:
module_param(myint, int, 0);
> In the sample code, it is said the MODULE_PARM macro can allow
> arguments to be passed to the driver module. But how?
modprobe mydriver myshort=42
> 2) Character Device Drivers(http://www.faqs.org/docs/kernel/x571.html)
> I can not catch the key points in this section. What should I learn
> from the "chardev.c" sample? How can I install the module as a device?
> How can I call the functions in the driver?
>
> 3) The /proc File System(http://www.faqs.org/docs/kernel/x716.html)
> What's the main points in the section. How does the /proc file system
> matter linux kernel programming?
Hardly at all anymore.
See http://lwn.net/Kernel/LDD3/ for a book that describes the current
2.6 kernel.
Erik
--
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
prev parent reply other threads:[~2006-06-19 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-19 9:30 leo.liang.chen
2006-06-19 9:42 ` Erik Mouw [this message]
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=20060619094245.GA13787@harddisk-recovery.com \
--to=erik@harddisk-recovery.com \
--cc=leo.liang.chen@gmail.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
all inboxes | Powered by JetHome®