Commit 4dcab280 authored by Peter Beutner's avatar Peter Beutner Committed by Alexandre Julliard

Proper implementation of IOCTL_{STORAGE,CDROM}_CHECK_VERIFY.

parent 22c97cd9
...@@ -1029,17 +1029,28 @@ static NTSTATUS CDROM_ReadQChannel(int dev, int fd, const CDROM_SUB_Q_DATA_FORMA ...@@ -1029,17 +1029,28 @@ static NTSTATUS CDROM_ReadQChannel(int dev, int fd, const CDROM_SUB_Q_DATA_FORMA
/****************************************************************** /******************************************************************
* CDROM_Verify * CDROM_Verify
* * Implements: IOCTL_STORAGE_CHECK_VERIFY
* IOCTL_CDROM_CHECK_VERIFY
* *
*/ */
static NTSTATUS CDROM_Verify(int dev, int fd) static NTSTATUS CDROM_Verify(int dev, int fd)
{ {
/* quick implementation */ #if defined(linux)
CDROM_SUB_Q_DATA_FORMAT fmt; int ret;
SUB_Q_CHANNEL_DATA data;
ret = ioctl(fd, CDROM_DRIVE_STATUS, NULL);
if(ret == -1) {
TRACE("ioctl CDROM_DRIVE_STATUS failed(%s)!\n", strerror(errno));
return CDROM_GetStatusCode(ret);
}
fmt.Format = IOCTL_CDROM_CURRENT_POSITION; if(ret == CDS_DISC_OK)
return CDROM_ReadQChannel(dev, fd, &fmt, &data) ? 1 : 0; return STATUS_SUCCESS;
else
return STATUS_NO_MEDIA_IN_DEVICE;
#endif
FIXME("not implemented for non-linux\n");
return STATUS_NOT_SUPPORTED;
} }
/****************************************************************** /******************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment