allocating some buffer space

Aman Devgan (aman@banga.unl.edu)
Wed, 12 Jun 1996 12:45:43 -0500 (CDT)


Hi ppl,

Sorry for the low quality of this question, but I really need to know
how I may be able to provide a space in memory that can store (say 48)
characters. I want that the "read()" call for the ext2fs (defined under
file.c) should, under certain conditions, fill up this space with 48
characters. I also want some routines elsewhere in the kernel to access
this buffer.

Playing with the code trying to understand it.. I did the following
modifications within the function, 'static int ext2_file_read()' (under
/usr/src/linux/fs/ext2/file.c):
1. Added a declaration : int act_ops = 0;
2. Added a line: if (act_ops)
printk("act_ops are on\n");

Now when I build the kernel and boot it I get this message on boot up:

LILO Loading Linux ......
Uncompressing Linux ...

crc error
-- System halted

I have no idea what's happening. I sometimes also get an error that says,
"unable to fill buffer" instead of "crc error". What is this error, and
how can just these two lines give me such an error?

Finally back to what I actually want to do.. how may I set aside a buffer,
that can be accessed by the "read()" call or routines under net/inet etc..

Thanks a tonne,

--
Aman Devgan
aman@cse.unl.edu