I'm porting a volume manager that is part of a file system to Mac OS X. One of the first things I need to do is to scan the device tree and find the disks I'm interested in. The only related documentation I've found describes how to access hardware from applications using IOKit. What I ended up doing in my kext is including a Darwin header, xnu/bsd/miscfs/devfs/devfsdefs.h, and walking the device tree to find the disks and their dev_t (and thus major and minor) numbers. I know this is frowned upon, but I couldn't find another way of doing it from inside the kernel. The problem I have now is distinguishing the disk entries I'm interested in from the ones I'm not. How can I talk to the driver associated with each device? I'd like to get target and lun numbers for the disks that are connected via a fibre channel HBA. Whilst I can see these numbers in IORegistryExplorer, I can't find a way of accessing them from inside the kernel. What is the recommended approach for getting information on devices in the device tree from inside the kernel? Also, am I wrong in my assumption that the IOKit is of little use to me inside a kext? Sam _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Sam Vaughan