Re: Error code 0x0000c001 / 49153 during DADiskUnmount
Re: Error code 0x0000c001 / 49153 during DADiskUnmount
- Subject: Re: Error code 0x0000c001 / 49153 during DADiskUnmount
- From: Jeff Johnson <email@hidden>
- Date: Thu, 22 May 2008 21:40:30 -0500
Tim,
I believe that this is actually just an errno 1 EPERM "Operation not
permitted".
If you look at <DiskArbitration/DADissenter.h>, you have "typedef
mach_error_t DAReturn". The format of a mach error is outlined in
<mach/error.h>: it had 6 bits for the system, 12 bits for the
subsystem, and 14 bits for the code. The system seems to be err_system
(0x0), or err_kern. The subsystem seems to be err_sub(3). In the same
header you have unix_error(errno) defined as "(err_kern|err_sub(3)|
errno)". Then in <sys/errno.h> you have the error codes.
The error itself might not be very helpful, but hopefully this
explanation was.
-Jeff
On May 22, 2008, at 11:51 AM, Tim Schooley wrote:
Hi folks,
Apologies in advance if this is the wrong list (and don't hesitate to
point me in the right direction).
The code I'm writing needs to programmatically mount a device to a
user-specified directory (such as /User/tester/mount_point).
Since the FSMountLocalVolumeSync() and co. functions ignore the mount
path (why, by the way?), I'm using the DA* functions.
Both DADiskMountWithArguments() and DADiskUnmount() work correctly.
However, when I mount a device, then open a file in vim within the
mount
point, and then request an unmount, I recieve the following error code
from the "dissenter" object: 0x0000c001.
I am retrieving this error code using the normal
DADissenterGetStatus()
route.
My problem is this: what is that code? It certainly isn't a
DAReturn code, and I haven't been able to find any documentation on
it. It is clear that it is a "device busy" kind of error (see
http://www.shirt-pocket.com/forums/archive/index.php/t-689.html),
but it'd be nice to know if there are any other "unknown" codes
that're going to be returned in the unmount callback!
The reason I am trying to unmount whilst having an open file within
the
mount point should be quite obvious - I need to handle cases where the
mounted device is busy.
Any help would be most appreciated. If you need extra info or code,
just
yell! :)
Kind regards,
Tim
_______________________________________________
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