Re: calling open() on an older cd device returns EBUSY??
Re: calling open() on an older cd device returns EBUSY??
- Subject: Re: calling open() on an older cd device returns EBUSY??
- From: "David M. Cotter" <email@hidden>
- Date: Wed, 04 May 2005 19:06:33 -0700
You can use opendev() to open the character device, that is,
"/dev/rdisk2"
so, opendev() gives you the char device, while open() gives you the
block device? I was unsuccessful doing open("disk2"), I *was*
successful doing open("rdisk2"). Are you saying it's better to call
opendev("rdisk2")? what exactly does prepending "r" in front of the
"disk2" do?
It seems unusual to us that the open on the block device was permitted
since an open from a file system is exclusive, so for an Audio CD,
"/dev/disk2" is opened by cddafs and hence cannot be opened by someone
else. We are somewhat at a loss to explain how someone else can open
it, at the moment. BSD enforces it.
well, i can assure you, i have no problems at all calling open("disk2")
on most systems. at least pre-tiger anyway, i don't know if tiger has
better BSD enforcement
We are looking into it. The character device is the correct device to
use though, especially that I do not believe your intent was to have
the system cache all the data your application reads from the Audio
CD, which could be up to 700 MB of data to have to remember.
correct, i just want to rip the stuff off and be done with it. i'm not
going to read it more than once.
and my apologies to anyone on the list who saw "anyone gotn'y clue
here" as something like "this list is clueless", totally honestly and
humbly, i state for the record I was feeling that *I* was the utterly
clueless one, just hoping for Obi-Wan Kenobi to save me.
_______________________________________________
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