I am writing a device driver and have implemented
file_operations write method. I would also like to be able to just redirect to the device driver, e.g.:
echo "this text is sent to driver" > /dev/driver_name
I originally assumed this would magically work with the user space message being sent to the
.write and the other parameters set accordingly. LDD3 chapter 3 has some code which is pretty similar to mine, and the authors refer to testing/playing around both by invoking the write method directly and by redirecting to the driver (as I desire to do), making me think that I am on the right track. However, when I tried redirecting to the driver, I received a "Permission denied" error and it did nothing.
Any direction/links/suggestions would be greatly appreciated.