Porting newbie seeks help with a couple of things
Porting newbie seeks help with a couple of things
- Subject: Porting newbie seeks help with a couple of things
- From: Michael Dupuis <email@hidden>
- Date: Tue, 2 Nov 2004 13:49:16 -0500
Greetings,
I've been tasked to port a project from Linux to Mac OS X, and am in
the process of doing that now. I've run into a few things that I'm not
sure about. It's been a long time since I've been in the 'innards' of a
Unix platform, and I'm usually a GUI/Framework guy, not a driver/disk
developer.
My first question is about the correct way to port from Linux ioctl
requests to Darwin (OS X). What I have on Linux right now is a call
like this:
ioctl(dev, HDIO_GET_IDENTITY, &id)
where HDIO_GET_ENTITY and id, which is a hd_driveid struct, are defined
in /linux/hdreg.h. If I copy this file from a Linux box, things will
compile, but I'm guessing that the request definition and struct might
be used differently on the Mac. Is there any info on the correct way to
make this change from Linux? I haven't had much searching.
My second question is similar: I need to be able to flush the disk
(device) and the Linux code does this using ioctl(fd, HDIO_DRIVE_CMD,
&flushcmd) where flushcmd is defined:
const unsigned char flushcmd[4] = {0xe7,0,0,0} and HDIO_DRIVE_CMD is
defined in hdreg.h. Again, with by including the linux header file,
things will compile, but I'm not sure they are working. Is there any
place I can look to make sure I'm doing this correctly?
Thanks in advance for any help getting this stuff running on OS X.
Mike
_______________________________________________
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