Re: filepath-on-device to BSD-devpath-of-that-device
Re: filepath-on-device to BSD-devpath-of-that-device
- Subject: Re: filepath-on-device to BSD-devpath-of-that-device
- From: Mo McRoberts <email@hidden>
- Date: Wed, 25 Apr 2007 20:41:48 +0100
On 25-Apr-2007, at 20:38, Chase wrote:
How do I get a BSD device path string (eg: "/dev/rdisk3") that
represents
the path to the device that holds a file for which I have a path
string
(eg: "/Volumes/SOME_DATA_CD/A_SUB_FOLDER/THE_FILE.txt")?
I can get the dev_t number of the device using stat(), but I'm not
sure
what to do with that number to get an actual path to the raw device.
... or maybe the stat() step is unnecessary altogether.
So (to sum up)...
How do I get a string like "/dev/rdisk3" starting with only the
string "/Volumes/SOME_DATA_CD/A_SUB_FOLDER/THE_FILE.txt" ?
I'm no expert, but I would have thought getfsstat() and friends.
_______________________________________________
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