| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi Darwin Experts - Please help me find the error of my ways..._______________________________________________
I'm trying to use my bsdname to find the specific instance of
my driver in the ioreg which is responsible for that media.
My driver is several levels 'up' (or down, depending on your
point of view) and the hope was to iterate up to the parent.
That doesn't seem to want to happen. Here's my short path
to instant failure: (the iterating logic is not shown because
the code fails on the first test)
------------------------------------------------------------
CFMutableDictionaryRef dictRef = NULL;
io_service_t service = 0;
io_registry_entry_t parent = 0;
kern-return_t kr = 0;
dictRef = IOBSDNameMatching(kIOMasterPortDefault, NULL, myBSDName);
service = IOServiceGetMatchingService( kIOMasterPortDefault, dictRef);
kr = IORegistryEntryGetParentEntry(service, kIOServicePlane, &parent);
-----------------------------------------------------------------------
kr = -536870206 or 0x1FFFFD3E or [0xE000 0x02C2]
-----------------------------------------------------------------------
Doing an ioreg at the terminal shows my bsdname item is there.
The count of the items in the dictRef is 2
'service' appears to be a reasonable number.
To me, it appears the initial call to IOBSDNameMatching is the
problem. Any thoughts as to how I am approaching this incorrectly?
Thanks very much!
Lance Drake
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.
| References: | |
| >Working backwards from a BSDname to service (From: Lance Drake <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.