Getting a block from a block device?

Dan Luedtke maildanrl at googlemail.com
Tue Nov 8 06:06:23 EST 2011


Hallo everyone,

could someone please give me a hint on how to get a block (e.g. 512
bytes) from a block device from a kernel module?

What .txt should I consult? Which headerfiles must I include?
Where can I find the required function's definitions?

In userspace I used fopen() with the device path as filename, I bet it
isn't that easy in kernel mode.

I am using kernel sources from gentoo: 3.0.6-gentoo, but I can use
vanilla if it really helps.

thanks,

Dan

-- 
Dan Luedtke
http://www.danrl.de



More information about the Kernelnewbies mailing list