summaryrefslogtreecommitdiffstats
path: root/sys/dev/eisa
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>1999-07-29 01:03:04 +0000
committermdodd <mdodd@FreeBSD.org>1999-07-29 01:03:04 +0000
commit1b3328c30076a4872fb76549719ee41c4f633e6a (patch)
tree08fbd565ea1bf201e2bfcfcd2a4119c82ef665a7 /sys/dev/eisa
parent0d84c8efb0a2e4b063d0c818f89eb17ee4bc6e47 (diff)
downloadFreeBSD-src-1b3328c30076a4872fb76549719ee41c4f633e6a.zip
FreeBSD-src-1b3328c30076a4872fb76549719ee41c4f633e6a.tar.gz
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
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 5fa1113..53650a1 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
OpenPOWER on IntegriCloud