Re: Reading large /proc entry from kernel module

From: Peter Chubb
Date: Tue Mar 08 2005 - 18:16:52 EST

>>>>> "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.
Dr Peter Chubb peterc AT
The technical we do immediately, the political takes *forever*
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