summaryrefslogtreecommitdiffstats
path: root/sys/pccard
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-11-02 21:26:07 +0000
committerimp <imp@FreeBSD.org>2001-11-02 21:26:07 +0000
commit931e47124f9dbe194217b9c63bb4a40d73229ab5 (patch)
treeeeab770b9afa4793d1b1c3501be88811aa91edc3 /sys/pccard
parentc79c2bc597c6607e322ec2af5a803df6098b33fe (diff)
downloadFreeBSD-src-931e47124f9dbe194217b9c63bb4a40d73229ab5.zip
FreeBSD-src-931e47124f9dbe194217b9c63bb4a40d73229ab5.tar.gz
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.
Diffstat (limited to 'sys/pccard')
-rw-r--r--sys/pccard/pccard.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index 9a369ba..6eeeabe 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);
OpenPOWER on IntegriCloud