lkml.org 
[lkml]   [1999]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:1.981 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site