From b152132e64fe0f456b3ff88d19c05e0cfa355e0c Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 2 Dec 1999 19:51:34 +0000 Subject: [PATCH] Print device names for children that fail to detach. Free child array when we're done with it. Forgotten by: imp Submitted by: Nick Hibma --- sys/pccard/pccard.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index 77a6bb66918..8eecad86f50 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -194,8 +194,10 @@ disable_slot(struct slot *slt) device_get_children(pccarddev, &kids, &nkids); for (i = 0; i < nkids; i++) { if ((ret = device_delete_child(pccarddev, kids[i])) != 0) - printf("pccard: delete failed: %d\n", ret); + printf("pccard: delete of %s failed: %d\n", + device_get_nameunit(kids[i]), ret); } + free(kids, M_TEMP); /* Power off the slot 1/2 second after removal of the card */ slt->poff_ch = timeout(power_off_slot, (caddr_t)slt, hz / 2); -- 2.45.2