diff options
Diffstat (limited to 'share/examples/kld/cdev/README')
-rw-r--r-- | share/examples/kld/cdev/README | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/share/examples/kld/cdev/README b/share/examples/kld/cdev/README index 2f1114c..dc650f1 100644 --- a/share/examples/kld/cdev/README +++ b/share/examples/kld/cdev/README @@ -58,6 +58,8 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # +# $FreeBSD$ +# 1.0 Overview @@ -83,6 +85,19 @@ try out changes to kernel code without rebuilding and booting from the new kernel. + The idea behind this example is to show some interaction + with the device driver. Therefore the flow of the code that + this driver is aimed at is as follows: + + open(2) -> ioctl(2) -> write(2) -> read(2) -> close(2). + + We will first open the device in the /dev/ directory; then + we will send an ioctl message to it using ioctl(2) call; + then write a small string via the write(2) call. This string + we write to the device will be stored in a static buffer, + and later will be accessible via the read(2) call. Finally, + we will close(2) our open()'d device so that we may no + longer make read or write calls on it. 2.0 Directions |