Re: Problem in Reading the Device file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




--- Greg KH <greg@xxxxxxxxx> wrote:

> On Tue, Jan 10, 2006 at 06:22:40AM -0800, kanishk
> rastogi wrote:
> >      if(fd=open("/dev/kanishk",O_RDWR)<=0)
> 
> 
> Are you sure /dev/kanishk has been created (by you,

----> Yes the device file had been created by me and
checked.
in fact in the dmesg (after executing the user prog)
the last message was from the open function...

the user prog runs "open func" sucessfully but while
running "read func" stops. and when i press enter it
comes out and displays  


Data Returned is :1// this shows the value returned by
read(while i am returning 0 from driver's read.
Data Entered is :  //this shows the data

> you don't have the
> logic in your example to have udev create it), and
> it has the proper
> permissions and the proper major/minor number
> assigned to it?
> 
> thanks,
> 
> greg k-h
> 
> --
> Kernelnewbies: Help each other learn about the Linux
> kernel.
> Archive:      
> http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> 



		
__________________________________________ 
Yahoo! DSL ? Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux