Thread (5 messages) 5 messages, 4 authors, 2012-10-15

(no subject)

From: Kumar amit mehta <hidden>
Date: 2012-10-15 11:12:36

On Mon, Oct 15, 2012 at 04:23:59PM +0530, Niroj Pokhrel wrote:
Thank Matthias!!!
I have tried using printk . What I really want to do now is to implement
the methods I have written by calling from the user space. Like I want to
read or write to the character devices via  user space.
Did you register your callbacks for read and write in your char driver ? 
If yes, then you can write and read(given you have methods for write and read
for your char driver), through 'echo', 'cat' etc of your char device through
fs nodes(under /dev). I'm guessing that you've exported your device under /dev
file system.


-Amit
On Mon, Oct 15, 2012 at 3:49 PM, Matthias Brugger <
matthias.bgg at googlemail.com> wrote:
quoted
Hi,


On 10/15/2012 11:24 AM, Niroj Pokhrel wrote:
quoted
Hi,
I'm new to linux and kernel . I'm ongoing with the linux device drivers.
I've followed the the book LDD but i'm lost about how to call my
driver's specific method from the user space.
Eg: if have developed a character device and inserted the module then
how can i make sure that when I read or write that it implement the
functions via the methods i have implemented in my module.
the most easy way would be to put some printk output in your read/write
functions of your driver. So with cat/echo from userspace you should be
able to verify your implementation.

Regards,
Matthias
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help