site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Greetings, ioctl(dev, HDIO_GET_IDENTITY, &id) 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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: 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? This email sent to site_archiver@lists.apple.com