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: Tim Schooley <email@hidden>
- Date: Fri, 23 May 2008 18:46:18 +0100
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.
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
Understood. Thanks for the insight.
Kind regards,
Tim
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________
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