Re: Force BSD file name of block device?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Thunderbird 2.0.0.14 (X11/20080513) That's the right thing to do. Understood. Thanks for the insight. Kind regards, Tim _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com Garth Cummings wrote: I'm currently creating IOBlockStorageDevice objects. I'm curious to know if there is a way to change the actual exposed BSD file name, for example from /dev/disk1 to /dev/monkey1 ? The reason I ask: my application needs to list devices that our driver has created. Normally, I would go down the route of searching IORegistry, looking for kIOBSDName etc. But if a rename of the device file is possible, the whole task could be simplified greatly. Don't do this. There's no way to know how much code out there depends on the /dev/*disk* naming convention. In my experience, "greatly" is a bit of an exaggeration. Walking the I/O Registry is not hard. Usually a IOServiceGetMatchingServices(YourDriversClassName) is all that's needed unless you want to handle hot-plugging. Which you do if your device is on a hot-pluggable bus. --gc signature.asc
participants (1)
-
Tim Schooley