* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: atapi.c,v 1.18 2002/03/25 21:54:41 ekohl Exp $
+/* $Id: atapi.c,v 1.19 2002/04/10 17:01:47 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS ATAPI miniport driver
DPRINT1("IDE error: %02x\n", ErrorReg);
ScsiStatus = 0;
+ SrbStatus = SRB_STATUS_ERROR;
#if 0
UCHAR SectorCount, SectorNum, CylinderLow, CylinderHigh;
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: cdrom.c,v 1.7 2002/03/25 21:56:19 ekohl Exp $
+/* $Id: cdrom.c,v 1.8 2002/04/10 17:02:22 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
{
/* Set ISO9660 defaults */
DiskDeviceExtension->DiskGeometry->BytesPerSector = 2048;
+ DiskDeviceExtension->DiskGeometry->MediaType = RemovableMedia;
DiskDeviceExtension->SectorShift = 11;
DiskDeviceExtension->PartitionLength.QuadPart = (ULONGLONG)0x7fffffff;
}
switch (ControlCode)
{
+ case IOCTL_CDROM_GET_DRIVE_GEOMETRY:
+ DPRINT1("IOCTL_CDROM_GET_DRIVE_GEOMETRY\n");
+ if (IrpStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(DISK_GEOMETRY))
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ }
+ else if (DeviceExtension->DiskGeometry == NULL)
+ {
+ DPRINT1("No cdrom geometry available!\n");
+ Status = STATUS_NO_SUCH_DEVICE;
+ }
+ else
+ {
+ PDISK_GEOMETRY Geometry;
+
+ Geometry = (PDISK_GEOMETRY) Irp->AssociatedIrp.SystemBuffer;
+ RtlMoveMemory(Geometry,
+ DeviceExtension->DiskGeometry,
+ sizeof(DISK_GEOMETRY));
+
+ Status = STATUS_SUCCESS;
+ Information = sizeof(DISK_GEOMETRY);
+ }
+ break;
+
default:
DPRINT1("Unhandled control code: %lx\n", ControlCode);
Status = STATUS_INVALID_DEVICE_REQUEST;
-/* $Id: ntddk.h,v 1.26 2002/01/14 01:41:08 ekohl Exp $
+/* $Id: ntddk.h,v 1.27 2002/04/10 17:01:10 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
#include <ntos/types.h>
#include <ntos/time.h>
+#include <ntos/cdrom.h>
#include <ntos/disk.h>
#include <ntos/registry.h>
#include <ntos/port.h>
--- /dev/null
+/* $Id: cdrom.h,v 1.1 2002/04/10 17:00:52 ekohl Exp $
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: include/ntos/cdrom.h
+ * PURPOSE: CD-ROM related definitions used by all the parts of the system
+ * PROGRAMMER: Eric Kohl <ekohl@rz-online.de>
+ * UPDATE HISTORY:
+ * 10/04/2002: Created
+ */
+
+#ifndef __INCLUDE_NTOS_CDROM_H
+#define __INCLUDE_NTOS_CDROM_H
+
+
+#define IOCTL_CDROM_GET_DRIVE_GEOMETRY CTL_CODE(FILE_DEVICE_CD_ROM, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS)
+
+
+#endif /* __INCLUDE_NTOS_CDROM_H */
+
+/* EOF */