Re: mount(..) example?
Re: mount(..) example?
- Subject: Re: mount(..) example?
- From: Kevin Elliott <email@hidden>
- Date: Tue, 25 Oct 2005 12:40:38 -0700
At 10:07 -0400 on 10/25/05, Luc Vandal wrote:
I'm having a hard time with the mount(..) function. Would anyone post
an example so I know how to use it? Basically, I need to use this
function to update a currently mounted cd-rom. Here's the code I'm
currently using:
int nCdError = 0;
char options[] = "check=relaxed";
char* szErr;
nCdError = mount( "cd9660", "/dev/disk1s0", MNT_UPDATE, options );
I always get a "Bad file descriptor" error... I guess that there's
something missing but what?
Thanks!
Luc
Well, basically, I don't think your using the function right. The
second argument is a path to the location you wish to mount the
volume NOT the dev node you wish to mount. At least that's my
interpretation of the man page.
What exactly are you trying to do? The general guidance from apple
has been to avoid mount like the plague. It doesn't interact well
with the rest of the system. Basically it doesn't interact at all.
Unless your SURE this is what you want, you should probably using
either the carbon mount API's or DiskArb.
--
______________________________________________________
Arguing with an engineer is like wrestling with a pig in mud.
After a while, you realize the pig is enjoying it.
______________________________________________________
Kevin Elliott <mailto:email@hidden>
AIM/iChatAV: email@hidden (video chat available)
______________________________________________________
_______________________________________________
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