DADiskMount behavior for whole disk object.
DADiskMount behavior for whole disk object.
- Subject: DADiskMount behavior for whole disk object.
- From: Inso Reiges <email@hidden>
- Date: Fri, 10 Dec 2010 12:23:44 +0600
Hello,
I am not sure this is the correct list to send my question to, but it
seems to have a lot of results for DADiskMount searches.
But please direct me to appropriate mailing list if i am absolutely
off topic here.
Can someone please explain to me the following DADiskMount behavior:
I have a DADiskRef object that references whole disk, i.e. disk1. This
disk is formatted and has a number of partitions on it.
I want to programmatically mount this whole disk on some directory to
achieve the same behavior as system does, i.e. to have disk partitions
automatically mounted on separate directories inside root directory:
/Volumes/Partition1, /Volumes/Partition2, etc. To do this i try the
following:
DADiskMount(wholeDiskRef, NULL, kDADiskMountOptionWhole, mountCallback, NULL);
And it works exactly as i expected. However when i try this instead:
CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,
CFSTR("/Volumes"), kCFURLPOSIXPathStyle, YES);
DADiskMount(wholeDiskRef, url, kDADiskMountOptionWhole, mountCallback,
argument);
It fails and dissenter in mountCallback has a status code of
kDAReturnBadArgument.
I looked up diskarbitrationd sources and found that in case of NULL
url argument it uses the same default path as i do: "/Volumes"
What am i doing wrong here and why two seemingly identical calls
produce different results?
Thank you, Inso.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden