Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

amudham

macrumors newbie
Original poster
Apr 15, 2009
16
0
Hi,
Can some one help me with the below issue...
I am trying to find whether given volume path is removable or not, using DASession. Here DADiskCopyDescription() function returns NULL at times.. It working for some times and fails some time.. (Session still exists)

I am not sure. what makes this to fail.... my code is running under daemon context... there are some 12 threads running in parallel... can some one guess whats makes DADiskCopyDescription() to fail?

Please advice, if there are other ways to achieve the same.

part of the code which fails...
#################################
DASessionRef session;
if (inSession)
session = inSession;
else
session = DASessionCreate( NULL );

if (session)
{
DADiskRef dad = DADiskCreateFromBSDName( NULL, session, bsdName );
if (dad)
{
CFDictionaryRef description = DADiskCopyDescription(dad);
........
........
.........
}
}
#################################
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.