• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Identifying CD drives across reboots
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifying CD drives across reboots


  • Subject: Re: Identifying CD drives across reboots
  • From: Dan Markarian <email@hidden>
  • Date: Tue, 18 Dec 2007 11:20:28 -0500

Hey Stephen,

You are correct in that the I/O Kit path is the most appropriate solution in absence of a unique ID. You can obtain the I/O Kit path to the device with kDADiskDescriptionDevicePathKey in Disk Arbitration. It returns a device tree path where one is available, but otherwise returns the service path.

The exception to the rule is USB. You need to take into account a property unique to USB to identify the location of the device on the bus. It is not encoded as part of the I/O Kit path. I believe kUSBDevicePropertyLocationID is the appropriate property.

Dan

On 18 Dec 2007, at 8:47 AM, Stephen F. Booth wrote:

Hello all,

I need to store some metadata about various CD drives, and have that information be accessible across reboots. I have a few ideas but I haven't figured out the best way to handle things yet. My current code does the following:
While I can't necessarily provide the answer you are looking for, what I can suggest is checking to see if IORegistryExplorer can see a serial number for your drive. If it does, then it would suggest that there is a way to get it.


This is a good idea; unfortunately IORegistryExplorer does not show a serial number for my drive, just the same information I could get already (the Protocol and Device characteristics).

I'm thinking of using the IOPath together with the manufacturer's name and model number as the identifier. It won't be guaranteed to be unique, but hopefully it will be close enough since identical devices at the same IOPath should probably behave the same!

Stephen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@apple.com


This email sent to email@hidden

_______________________________________________ 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
References: 
 >Identifying CD drives across reboots (From: "Stephen F. Booth" <email@hidden>)
 >Re: Identifying CD drives across reboots (From: Andre-John Mas <email@hidden>)
 >Re: Identifying CD drives across reboots (From: "Stephen F. Booth" <email@hidden>)

  • Prev by Date: How does 'Finder' open an application and bring the window to the front?
  • Next by Date: Re: Identifying CD drives across reboots
  • Previous by thread: Re: Identifying CD drives across reboots
  • Next by thread: Re: Identifying CD drives across reboots
  • Index(es):
    • Date
    • Thread