On Tue, Nov 30, 1999 at 02:54:28PM -0800, Frank Mayhar wrote:
> > On Tue, Nov 30, 1999 at 02:59:10PM -0700, Warner Losh wrote:
> > >   pccarddev = devclass_get_device(pccard_devclass, slt->slot);
> > >   device_get_children(pccarddev, &kids, &nkids)
> > >   for (i = 0; i < nkids; i++)
> > >           device_delete_child(pccarddev, kid[0]);
> 
> I'll bet Warner meant
>               device_delete_child(pccarddev, kid[i]);
> up there, and not
>               device_delete_child(pccarddev, kid[0]);
> 
> Did you try that?

Yes, the actual code I used is:

        pccarddev = devclass_get_device(pccard_devclass, slt->slotnum);
        device_get_children(pccarddev, &kids, &nkids);
        printf("pccard: %d kids\n", nkids);
        for (i = 0; i < nkids; i++) {
          printf("pccard: deleting kid %d\n", i);
          if (ret=device_delete_child(pccarddev, kids[i]))
            printf("pccard: delete kid %d failed: %d\n", i, ret);
        }

It's not quite working.  I think I got away ok with the ethernet card
because it wasn't being accessed, but my CDPD card with a running PPP
session pretty reliably still freezes up.  Hrm.  No, it's not freezing
up, it's a panic, but I'm running X and can't get to it.
-- 
Christopher Masto         Senior Network Monkey      NetMonger Communications
[EMAIL PROTECTED]        [EMAIL PROTECTED]        http://www.netmonger.net

Free yourself, free your machine, free the daemon -- http://www.freebsd.org/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to