Re: Try 2:Implement IOCTL_SCSI_GET_INQUIRY_DATA
"Vitaliy Margolen" <wine-patch(a)kievinfo.com> wrote:
Check for HAVE_SG_IO_HDR_T_INTERFACE_ID instead of defined Linux
+static NTSTATUS GetInquiryData(int fd, PSCSI_ADAPTER_BUS_INFO BufferOut, DWORD OutBufferSize) +{ + PSCSI_INQUIRY_DATA inquirydata = NULL; + sg_io_hdr_t iocmd; ^^^^^^^^^^^^^^^^^ + UCHAR inquiry[INQ_CMD_LEN] = {INQUIRY, 0, 0, 0, INQ_REPLY_LEN, 0}; + UCHAR sense_buffer[32]; + struct hd_driveid; + int iochk, version; + +#ifdef HAVE_SG_IO_HDR_T_INTERFACE_ID + /* Check we have a SCSI device and a supported driver */ + if(ioctl(fd, SG_GET_VERSION_NUM, &version) != 0)
This won't compile if sg_io_hdr_t doesn't present. Underlined structure declaration needs to be protected as well. Just add '#undef HAVE_SG_IO_HDR_T_INTERFACE_ID' after config.h include and try to compile. -- Dmitry.
participants (1)
-
Dmitry Timoshkov