Re: Force BSD file name of block device?
Re: Force BSD file name of block device?
- Subject: Re: Force BSD file name of block device?
- From: Garth Cummings <email@hidden>
- Date: Fri, 23 May 2008 10:33:09 -0700
Hi Tim,
On May 23, 2008, at 4:08 AM, Tim Schooley wrote:
Hi there,
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.
That's the right thing to do.
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
____________________________________________________________________
Garth Cummings email@hidden
Sr. Software Engineer
Apple Developer Technical Support
<http://developer.apple.com/technicalsupport>
WWDC 2008 • June 9-13 • Moscone West • San Francisco, CA
<http://developer.apple.com/wwdc/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden