Re: Difference between dvd and dmg
Re: Difference between dvd and dmg
- Subject: Re: Difference between dvd and dmg
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sun, 23 Oct 2005 23:03:42 +0200
On 23.10.2005, at 20:02, j o a r wrote:
On 12 okt 2005, at 18.54, Gerriet M. Denkmann wrote:
This is correct. So the question should be:
When one opens a raw device via open(/dev/rdisk...) how does one get
the hardware sector size (which in this case is needed for read or
pread)?
It seems to be 512 for disks, 2048 for rotating media. But maybe
there is something better than trial and error?
You can get this value from IOKit fairly easily, using
"kIOMediaSizeKey".
I just found another way, which might be as easy as using the IOKit:
unsigned a;
ioctl(.., DKIOGETBLOCKSIZE, &a);
Now something quite different:
How does one find this (I found it just by chance)?
The man page for ioctl is not very helpful. It refers to <sys/ioctl.h>
which does not help either. Neither mentions sys/disk.h which defines
(and explains) DKIOGETBLOCKSIZE.
Kind regards,
Gerriet.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden