aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/eisa
diff options
context:
space:
mode:
authorMatthew N. Dodd <mdodd@FreeBSD.org>1999-07-29 01:03:04 +0000
committerMatthew N. Dodd <mdodd@FreeBSD.org>1999-07-29 01:03:04 +0000
commit15317dd875420f6e8953f95fa7de214465187dda (patch)
tree4895cb91c66163742479e4442fcd330fed36fc9b /sys/dev/eisa
parent7558f6aad9132f231a62b6bf2bb57f082dc0a57d (diff)
downloadsrc-15317dd875420f6e8953f95fa7de214465187dda.tar.gz
src-15317dd875420f6e8953f95fa7de214465187dda.zip
Alter the behavior of sys/kern/subr_bus.c:device_print_child()
- device_print_child() either lets the BUS_PRINT_CHILD method produce the entire device announcement message or it prints "foo0: not found\n" Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on the previous behavior of device_print_child() (printing the "foo0: <FooDevice 1.1>" bit of the announce message.) Provide bus_print_child_header() and bus_print_child_footer() to actually print the output for bus_generic_print_child(). These functions should be used whenever possible (unless you can just use bus_generic_print_child()) The BUS_PRINT_CHILD method now returns int instead of void. Modify everything else that defines or uses a BUS_PRINT_CHILD method to comply with the above changes. - Devices are 'on' a bus, not 'at' it. - If a custom BUS_PRINT_CHILD method does the same thing as bus_generic_print_child(), use bus_generic_print_child() - Use device_get_nameunit() instead of both device_get_name() and device_get_unit() - All BUS_PRINT_CHILD methods return the number of characters output. Reviewed by: dfr, peter
Notes
Notes: svn path=/head/; revision=49195
Diffstat (limited to 'sys/dev/eisa')
-rw-r--r--sys/dev/eisa/eisaconf.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/dev/eisa/eisaconf.c b/sys/dev/eisa/eisaconf.c
index 5fa11139904d..53650a148efe 100644
--- a/sys/dev/eisa/eisaconf.c
+++ b/sys/dev/eisa/eisaconf.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: eisaconf.c,v 1.46 1999/06/22 09:44:00 peter Exp $
+ * $Id: eisaconf.c,v 1.47 1999/07/11 13:42:35 dfr Exp $
*/
#include "opt_eisa.h"
@@ -212,12 +212,17 @@ eisa_probe_nomatch(device_t dev, device_t child)
return;
}
-static void
+static int
eisa_print_child(device_t dev, device_t child)
{
- /* XXX print resource descriptions? */
- printf(" at slot %d", eisa_get_slot(child));
- printf(" on %s", device_get_nameunit(dev));
+ int retval = 0;
+
+ bus_print_child_header(dev, child);
+
+ retval += printf(" on %s slot %d", device_get_nameunit(dev),
+ eisa_get_slot(child));
+
+ return (retval);
}
static int