From: "Anthony Chee" <anthony.chee@polyu.edu.hk>
To: <linux-kernel@vger.kernel.org>
Subject: read proc entry
Date: Sat, 13 Apr 2002 21:48:31 +0800 [thread overview]
Message-ID: <000901c1e2f1$e65e9b00$0100a8c0@winxp> (raw)
I written the following code in a module
static struct proc_dir_entry *test_proc;
test_proc = create_proc_read_entry(test_proc, 0444, NULL, read_test_proc,
NULL);
void show_kernel_message() {
printk("\nkernel test\n");
}
int read_test_info(char* page, char** start, off_t off, int count, int* eof,
void* data) {
show_kernel_message();
}
After I use "cat /proc/test_proc", it is found that there are three "kernel
test" messages
appear. Why it happened like this? I expected the message should be shown
once.
next reply other threads:[~2002-04-13 13:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-13 13:48 Anthony Chee [this message]
2002-04-13 13:58 ` Peter Wächtler
2002-04-13 14:07 ` Anthony Chee
2002-04-18 18:48 ` Randy.Dunlap
2002-04-13 14:19 James Washer
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='000901c1e2f1$e65e9b00$0100a8c0@winxp' \
--to=anthony.chee@polyu.edu.hk \
--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®