From: runcoderen <runcoderzhcn@gmail.com>
To: Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: ldd module param practice
Date: Mon, 23 Aug 2010 07:00:18 +0800 [thread overview]
Message-ID: <1282518018.1661.15.camel@bencharluo-laptop> (raw)
hi all:
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
MODULE_LICENSE("Dual BSD/GPL");
static char *whom = "world";
static char howmany = 1;
module_param(howmany, int, S_IRUGO);
module_param(whom, charp, S_IRUGO);
static int hello_init(void)
{
printk(KERN_ALERT "Hello, world\n");
return 0;
}
static void hello_exit(void)
{
printk(KERN_ALERT "Goodbye, cruel world\n");
}
module_init(hello_init);
module_exit(hello_exit);
insmod hellop.ko howmany=10 whom="Mom"
this code I want to printk "hello Mom" 10 times.
but it doesn't work. so I modified static int howmany = 10, it doesn't
work either.
I don't know whether it's my wronging use?
--
/****************************************
http://runcoderen.wordpress.com/
****************************************/
next reply other threads:[~2010-08-22 23:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-22 23:00 runcoderen [this message]
2010-08-23 2:12 ` rdunlap
2010-08-23 2:19 ` Américo Wang
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=1282518018.1661.15.camel@bencharluo-laptop \
--to=runcoderzhcn@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®