Messages in this thread | | | From | Grigory Lyahovitsky <> | Date | Mon, 5 Jul 1999 16:19:03 +0400 | Subject | |
| |
Hello!
I needed to write driver of block device. Roughly, I have some file (assume /tmp/aaa) and I need to write kernel module, which implements
struct file_operations { .... ssize_t (*read) (struct file *, char *, size_t, loff_t *); ssize_t (*write) (struct file *, const char *, size_t, loff_t *); .... };
read/write functions to my device... Then I want to do mknod /dev/aaa b ... and I hope that /dev/aaa will appeared :) But, there are some problems...
First, I suppose that I must not use sdandart c libraries (libc.a) and I must use some "kernel" library (i.e. I must not use fopen/../fclose functions) But, I couldn't find this kernel library and even any file-operation function in header's files in /usr/include/linux
Second, when I use standart library libc.a after linking I have a huge module (~1.2Mb!!!!) ... And module can't open my file...
Is anybody know where I can read some document/examples on this topic??
Bye...
P.S. And I'm sorry for my ugly english... :)
----------------------------------------- Lyahovitsky Grigory (grigory@7ka.mipt.ru)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |