diff options
author | Warner Losh <imp@FreeBSD.org> | 2001-11-02 21:26:07 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2001-11-02 21:26:07 +0000 |
commit | cb2445bdb4c2182460823d3d3e49de4fc9ff1c67 (patch) | |
tree | eeab770b9afa4793d1b1c3501be88811aa91edc3 /sys/pccard/pccard.c | |
parent | 02cb981ff7d3ff1bf251d2dce369f20b921c8bf0 (diff) |
Better error messages for the cases where device_add_child fails. We
should also whine if the old pccardd is used, but that's a little
harder than it sounds.
This also has the effect of fixing a typo that was in the last
version I committed.
Notes
Notes:
svn path=/head/; revision=85906
Diffstat (limited to 'sys/pccard/pccard.c')
-rw-r--r-- | sys/pccard/pccard.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index 9a369ba481e9..6eeeabe672f5 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -243,8 +243,14 @@ allocate_driver(struct slot *slt, struct dev_desc *desc) resource_list_init(&devi->resources); child = device_add_child(pccarddev, devi->name, desc->unit); if (child == NULL) { - device_printf(pccardd, - "device_add_child shouldn't have failed, but did\n"); + if (desc->unit != -1) + device_printf(pccarddev, + "Unit %d failed for %s, try a different unit\n", + desc->unit, devi->name); + else + device_printf(pccarddev, + "No units available for %s. Impossible?\n", + devi->name); return (EIO); } device_set_flags(child, desc->flags); |