[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: Reading large /proc entry from kernel module
From:       Kristian =?iso-8859-1?q?S=F8rensen?= <ks () cs ! aau ! dk>
Date:       2005-03-08 23:31:17
Message-ID: 200503090031.17502.ks () cs ! aau ! dk
[Download RAW message or body]

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic