From 97b9b5c3f7ba1b0777f12e93fb22e63f721c2045 Mon Sep 17 00:00:00 2001 From: Warren Block Date: Sat, 7 Jan 2012 22:08:17 +0000 Subject: [PATCH] Correct programlisting elements, fix trailing spaces, tabs after spaces, and blank lines. Translators may wish to verify the output of programlisting elements. Although these are whitespace changes, they can result in differences in the rendered output. --- .../books/arch-handbook/newbus/chapter.sgml | 55 ++++++++----------- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/en_US.ISO8859-1/books/arch-handbook/newbus/chapter.sgml b/en_US.ISO8859-1/books/arch-handbook/newbus/chapter.sgml index c60e3ac766..ba58253490 100644 --- a/en_US.ISO8859-1/books/arch-handbook/newbus/chapter.sgml +++ b/en_US.ISO8859-1/books/arch-handbook/newbus/chapter.sgml @@ -239,33 +239,29 @@ Newbus Methods - - # Foo subsystem/driver (a comment...) - + # Foo subsystem/driver (a comment...) + INTERFACE foo - METHOD int doit { - device_t dev; - }; - - # DEFAULT is the method that will be used, if a method was not - # provided via: DEVMETHOD() - - METHOD void doit_to_child { - device_t dev; - driver_t child; - } DEFAULT doit_generic_to_child; - + METHOD int doit { + device_t dev; + }; + + # DEFAULT is the method that will be used, if a method was not + # provided via: DEVMETHOD() + + METHOD void doit_to_child { + device_t dev; + driver_t child; + } DEFAULT doit_generic_to_child; When this interface is compiled, it generates a header file foo_if.h which contains function declarations: - - int FOO_DOIT(device_t dev); - int FOO_DOIT_TO_CHILD(device_t dev, device_t child); - + int FOO_DOIT(device_t dev); + int FOO_DOIT_TO_CHILD(device_t dev, device_t child); A source file, foo_if.c is also created to accompany the automatically generated header @@ -378,10 +374,9 @@ struct driver { - KOBJ_CLASS_FIELDS; - void *priv; /* driver private data */ - }; - + KOBJ_CLASS_FIELDS; + void *priv; /* driver private data */ + }; A device_state_t type, which is @@ -393,17 +388,15 @@ Device states<emphasis>device_state_t</emphasis> - - /* + /* * src/sys/sys/bus.h */ typedef enum device_state { - DS_NOTPRESENT, /* not probed or probe failed */ - DS_ALIVE, /* probe succeeded */ - DS_ATTACHED, /* attach method called */ - DS_BUSY /* device is open */ - } device_state_t; - + DS_NOTPRESENT, /* not probed or probe failed */ + DS_ALIVE, /* probe succeeded */ + DS_ATTACHED, /* attach method called */ + DS_BUSY /* device is open */ + } device_state_t;