Re: 'No such device or address' when writing to device driver

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

 



On Fri, Jan 8, 2010 at 11:46 AM, Durga Prasad <writexdp@xxxxxxxxx> wrote:
> Run strace to cat.
> You will know what is causing the error.
> Can you post the code?
> Regards
> Durga
> ________________________________
> From: Sam Carter <sam.w.carter@xxxxxxxxx>
> To: kernelnewbies <kernelnewbies@xxxxxxxxxxxx>
> Sent: Thu, January 7, 2010 7:01:20 AM
> Subject: 'No such device or address' when writing to device driver
>
> Hi all,
>
> I'm trying to write a simple char driver following the 'Linux Device
> Drivers' book from O' Reilly. My driver appears in /proc/devices and under
> lsmod. I've been trying to register the device fops table so I can
> read/write to it, however when I try to cat some data to it in /dev/myDevice
> I get the error 'No such device or address'. The device does appear on the
> list with ls /dev/.
>
> Can anyone help me find the source of this problem? Thanks in advance.
>

The very first check...

#1 cat /proc/devices | grep <your_driver>

#2 ls -l  /dev/<your_device> and get the  the major number

Both must match !!!




> Sam
>
>



-- 
Regards,
Sandeep.





 	
“To learn is to change. Education is a process that changes the learner.”

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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