From: "Peter Wächtler" <pwaechtler@loewe-komp.de>
To: Anthony Chee <anthony.chee@polyu.edu.hk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: read proc entry
Date: Sat, 13 Apr 2002 15:58:05 +0200 [thread overview]
Message-ID: <3CB8396D.55A28D65@loewe-komp.de> (raw)
In-Reply-To: <000901c1e2f1$e65e9b00$0100a8c0@winxp>
Anthony Chee wrote:
>
> 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();
I think you have to signal EOF
*eof=1;
> }
>
> 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 prev parent reply other threads:[~2002-04-13 13:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-13 13:48 Anthony Chee
2002-04-13 13:58 ` Peter Wächtler [this message]
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=3CB8396D.55A28D65@loewe-komp.de \
--to=pwaechtler@loewe-komp.de \
--cc=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®