The HyperNews Linux KHG Discussion Pages

Question: return value of foo_write(...)

Forum: Character Device Drivers
Keywords: return values
Date: Fri, 25 Apr 1997 21:42:46 GMT
From: My name here <>

In this section I noticed the example foo_write function returns 0 all the time. If I do this as well with my driver and do this:

	echo "test" > /dev/foo_drv

the foo_write () function gets called indefinately. Furthermore, I have noticed that from the source of serial.c (from /usr/src/linux-2.0.0/drivers/char) always returns the number of characters transmitted. Do you have a typo?

Also, why isn't there a DEFINITIVE list of return values for all functions? This is a bit confusing, but still much better than programming under NT :).

	Thanks for the documentation anyhow!