hi everybody,
i am working in device drivers.As a beginner to this field ,i dont know how to read or write device files. Will copy_to_user and copy_from_user help me?
I have created a device file using mknod command .Can anybody help me in this regard :confused
thanks in advance
sriram
/dev/tty is a device file. Try this:
echo hello > /dev/tty
See? You just wrote on a device file. You write to them like any other file.
HOWEVER!!!! You cannot use mknod and create usable device file unless you know exactly what you are doing. mknod is the last step. First you write a device driver, then you install the driver into your kernel, and finally you use mknod to create a device file that points to your new driver.