From: "Kristian Sørensen" <ks@cs.aau.dk>
To: Peter Chubb <peterc@gelato.unsw.edu.au>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Reading large /proc entry from kernel module
Date: Wed, 9 Mar 2005 00:31:17 +0100 [thread overview]
Message-ID: <200503090031.17502.ks@cs.aau.dk> (raw)
In-Reply-To: <16942.12134.913207.508414@wombat.chubb.wattle.id.au>
On Wednesday 09 March 2005 00:04, Peter Chubb wrote:
> >>>>> "Kristian" == Kristian Sørensen <ks@cs.aau.dk> writes:
>
> Kristian> Hi all! I have some trouble reading a 2346 byte /proc entry
> Kristian> from our Umbrella kernel module.
>
>
> Kristian> static int umb_proc_write(struct file *file, const char *buffer,
> Kristian> unsigned long count, void *data) {
> Kristian> char *policy;
> Kristian> int *lbuf;
> Kristian> int i;
>
> Here's your problem: lbuf should be a char * not an int *.
> When you look lbuf[0] you'll get the first four characters packed
> into the int.
Okay, thanks! :-D That solves the first error :)
However, I still only get the the first 1003 characters, when I traverse the
buffer :-/
--
Kristian Sørensen
E-mail: ipqw@users.sf.net, Phone: +45 29723816
next prev parent reply other threads:[~2005-03-08 23:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-08 13:45 Reading large /proc entry from kernel module Kristian Sørensen
2005-03-08 23:04 ` Peter Chubb
2005-03-08 23:31 ` Kristian Sørensen [this message]
2005-03-09 15:17 ` Bob Bennett
2005-03-09 21:59 ` Kristian Sørensen
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=200503090031.17502.ks@cs.aau.dk \
--to=ks@cs.aau.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=peterc@gelato.unsw.edu.au \
/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