Re: Reading large /proc entry from kernel module

From: Kristian Sørensen
Date: Tue Mar 08 2005 - 18:48:16 EST

On Wednesday 09 March 2005 00:04, Peter Chubb wrote:
> >>>>> "Kristian" == Kristian Sørensen <ks@xxxxxxxxx> 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@xxxxxxxxxxxx, Phone: +45 29723816
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at