Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

tape.h File Reference

#include "scsi.h"
#include "class.h"

Go to the source code of this file.

Classes

struct  _TAPE_DATA
struct  _MODE_DEVICE_CONFIGURATION_PAGE
struct  _MODE_MEDIUM_PARTITION_PAGE
struct  _MODE_DATA_COMPRESSION_PAGE
struct  _MODE_MEDIUM_PART_PAGE
struct  _MODE_TAPE_MEDIA_INFORMATION
struct  _MODE_DEVICE_CONFIG_PAGE
struct  _MODE_DATA_COMPRESS_PAGE

Defines

#define MAXIMUM_TAPE_INQUIRY_DATA   252
#define DEVICE_EXTENSION_SIZE   sizeof(DEVICE_EXTENSION) + sizeof(TAPE_DATA)

Typedefs

typedef _TAPE_DATA TAPE_DATA
typedef _TAPE_DATAPTAPE_DATA
typedef _MODE_DEVICE_CONFIGURATION_PAGE MODE_DEVICE_CONFIGURATION_PAGE
typedef _MODE_DEVICE_CONFIGURATION_PAGEPMODE_DEVICE_CONFIGURATION_PAGE
typedef _MODE_MEDIUM_PARTITION_PAGE MODE_MEDIUM_PARTITION_PAGE
typedef _MODE_MEDIUM_PARTITION_PAGEPMODE_MEDIUM_PARTITION_PAGE
typedef _MODE_DATA_COMPRESSION_PAGE MODE_DATA_COMPRESSION_PAGE
typedef _MODE_DATA_COMPRESSION_PAGEPMODE_DATA_COMPRESSION_PAGE
typedef _MODE_MEDIUM_PART_PAGE MODE_MEDIUM_PART_PAGE
typedef _MODE_MEDIUM_PART_PAGEPMODE_MEDIUM_PART_PAGE
typedef _MODE_TAPE_MEDIA_INFORMATION MODE_TAPE_MEDIA_INFORMATION
typedef _MODE_TAPE_MEDIA_INFORMATIONPMODE_TAPE_MEDIA_INFORMATION
typedef _MODE_DEVICE_CONFIG_PAGE MODE_DEVICE_CONFIG_PAGE
typedef _MODE_DEVICE_CONFIG_PAGEPMODE_DEVICE_CONFIG_PAGE
typedef _MODE_DATA_COMPRESS_PAGE MODE_DATA_COMPRESS_PAGE
typedef _MODE_DATA_COMPRESS_PAGEPMODE_DATA_COMPRESS_PAGE

Functions

NTSTATUS DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
NTSTATUS ScsiTapeInitialize (IN PDRIVER_OBJECT DriverObject)
NTSTATUS ScsiTapeCreate (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS ScsiTapeReadWrite (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS ScsiTapeDeviceControl (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS TapeCreatePartition (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS TapeErase (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
VOID TapeError (PDEVICE_OBJECT DeviceObject, PSCSI_REQUEST_BLOCK Srb, NTSTATUS *Status, BOOLEAN *Retry)
NTSTATUS TapeGetDriveParameters (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS TapeGetMediaParameters (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS TapeGetPosition (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS TapeGetStatus (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS TapePrepare (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS TapeReadWrite (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS TapeSetDriveParameters (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS TapeSetMediaParameters (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS TapeSetPosition (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
BOOLEAN TapeVerifyInquiry (IN PSCSI_INQUIRY_DATA LunInfo)
NTSTATUS TapeWriteMarks (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)


Define Documentation

#define DEVICE_EXTENSION_SIZE   sizeof(DEVICE_EXTENSION) + sizeof(TAPE_DATA)
 

Definition at line 48 of file tape.h.

#define MAXIMUM_TAPE_INQUIRY_DATA   252
 

Definition at line 35 of file tape.h.


Typedef Documentation

typedef struct _MODE_DATA_COMPRESS_PAGE MODE_DATA_COMPRESS_PAGE
 

typedef struct _MODE_DATA_COMPRESSION_PAGE MODE_DATA_COMPRESSION_PAGE
 

typedef struct _MODE_DEVICE_CONFIG_PAGE MODE_DEVICE_CONFIG_PAGE
 

typedef struct _MODE_DEVICE_CONFIGURATION_PAGE MODE_DEVICE_CONFIGURATION_PAGE
 

typedef struct _MODE_MEDIUM_PART_PAGE MODE_MEDIUM_PART_PAGE
 

typedef struct _MODE_MEDIUM_PARTITION_PAGE MODE_MEDIUM_PARTITION_PAGE
 

typedef struct _MODE_TAPE_MEDIA_INFORMATION MODE_TAPE_MEDIA_INFORMATION
 

typedef struct _MODE_DATA_COMPRESS_PAGE * PMODE_DATA_COMPRESS_PAGE
 

typedef struct _MODE_DATA_COMPRESSION_PAGE * PMODE_DATA_COMPRESSION_PAGE
 

typedef struct _MODE_DEVICE_CONFIG_PAGE * PMODE_DEVICE_CONFIG_PAGE
 

typedef struct _MODE_DEVICE_CONFIGURATION_PAGE * PMODE_DEVICE_CONFIGURATION_PAGE
 

typedef struct _MODE_MEDIUM_PART_PAGE * PMODE_MEDIUM_PART_PAGE
 

typedef struct _MODE_MEDIUM_PARTITION_PAGE * PMODE_MEDIUM_PARTITION_PAGE
 

typedef struct _MODE_TAPE_MEDIA_INFORMATION * PMODE_TAPE_MEDIA_INFORMATION
 

typedef struct _TAPE_DATA * PTAPE_DATA
 

typedef struct _TAPE_DATA TAPE_DATA
 


Function Documentation

NTSTATUS DriverEntry IN PDRIVER_OBJECT  DriverObject,
IN PUNICODE_STRING  RegistryPath
 

Definition at line 67 of file fs_rec.c.

00074 : 00075 00076 This routine is invoked once when the driver is loaded to allow the driver 00077 to initialize itself. The initialization for the driver consists of simply 00078 creating a device object for each type of file system recognized by this 00079 driver, and then registering each as active file systems. 00080 00081 Arguments: 00082 00083 DriverObject - Pointer to the driver object for this driver. 00084 00085 RegistryPath - Pointer to the registry service node for this driver. 00086 00087 Return Value: 00088 00089 The function value is the final status of the initialization for the driver. 00090 00091 --*/ 00092 00093 { 00094 PDEVICE_OBJECT UdfsMainRecognizerDeviceObject; 00095 NTSTATUS status; 00096 ULONG count = 0; 00097 00098 PAGED_CODE(); 00099 00100 // 00101 // Mark the entire driver as pagable. 00102 // 00103 00104 MmPageEntireDriver ((PVOID)DriverEntry); 00105 00106 // 00107 // Begin by initializing the driver object so that it the driver is 00108 // prepared to provide services. 00109 // 00110 00111 DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = FsRecFsControl; 00112 DriverObject->MajorFunction[IRP_MJ_CREATE] = FsRecCreate; 00113 DriverObject->MajorFunction[IRP_MJ_CLEANUP] = FsRecCleanupClose; 00114 DriverObject->MajorFunction[IRP_MJ_CLOSE] = FsRecCleanupClose; 00115 DriverObject->DriverUnload = FsRecUnload; 00116 00117 FsRecLoadSync = ExAllocatePoolWithTag( NonPagedPool, sizeof(KEVENT), FSREC_POOL_TAG ); 00118 00119 if (FsRecLoadSync == NULL) { 00120 00121 return STATUS_INSUFFICIENT_RESOURCES; 00122 } 00123 00124 KeInitializeEvent( FsRecLoadSync, SynchronizationEvent, TRUE ); 00125 00126 // 00127 // Create and initialize each of the file system driver type device 00128 // objects. 00129 // 00130 00131 status = FsRecCreateAndRegisterDO( DriverObject, 00132 NULL, 00133 NULL, 00134 L"\\Cdfs", 00135 L"\\FileSystem\\CdfsRecognizer", 00136 CdfsFileSystem, 00137 FILE_DEVICE_CD_ROM_FILE_SYSTEM ); 00138 if (NT_SUCCESS( status )) { 00139 count++; 00140 } 00141 00142 status = FsRecCreateAndRegisterDO( DriverObject, 00143 NULL, 00144 &UdfsMainRecognizerDeviceObject, 00145 L"\\UdfsCdRom", 00146 L"\\FileSystem\\UdfsCdRomRecognizer", 00147 UdfsFileSystem, 00148 FILE_DEVICE_CD_ROM_FILE_SYSTEM ); 00149 if (NT_SUCCESS( status )) { 00150 count++; 00151 } 00152 00153 status = FsRecCreateAndRegisterDO( DriverObject, 00154 UdfsMainRecognizerDeviceObject, 00155 NULL, 00156 L"\\UdfsDisk", 00157 L"\\FileSystem\\UdfsDiskRecognizer", 00158 UdfsFileSystem, 00159 FILE_DEVICE_DISK_FILE_SYSTEM ); 00160 if (NT_SUCCESS( status )) { 00161 count++; 00162 } 00163 00164 status = FsRecCreateAndRegisterDO( DriverObject, 00165 NULL, 00166 NULL, 00167 L"\\Fat", 00168 L"\\FileSystem\\FatRecognizer", 00169 FatFileSystem, 00170 FILE_DEVICE_DISK_FILE_SYSTEM ); 00171 if (NT_SUCCESS( status )) { 00172 count++; 00173 } 00174 00175 status = FsRecCreateAndRegisterDO( DriverObject, 00176 NULL, 00177 NULL, 00178 L"\\Ntfs", 00179 L"\\FileSystem\\NtfsRecognizer", 00180 NtfsFileSystem, 00181 FILE_DEVICE_DISK_FILE_SYSTEM ); 00182 if (NT_SUCCESS( status )) { 00183 count++; 00184 } 00185 00186 if (count) { 00187 return STATUS_SUCCESS; 00188 } else { 00189 return STATUS_IMAGE_ALREADY_LOADED; 00190 } 00191 }

NTSTATUS ScsiTapeCreate IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

NTSTATUS ScsiTapeDeviceControl IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

NTSTATUS ScsiTapeInitialize IN PDRIVER_OBJECT  DriverObject  ) 
 

NTSTATUS ScsiTapeReadWrite IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

NTSTATUS TapeCreatePartition IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

NTSTATUS TapeErase IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

VOID TapeError PDEVICE_OBJECT  DeviceObject,
PSCSI_REQUEST_BLOCK  Srb,
NTSTATUS *  Status,
BOOLEAN *  Retry
 

NTSTATUS TapeGetDriveParameters IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

NTSTATUS TapeGetMediaParameters IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

NTSTATUS TapeGetPosition IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

NTSTATUS TapeGetStatus IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

NTSTATUS TapePrepare IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

NTSTATUS TapeReadWrite IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

NTSTATUS TapeSetDriveParameters IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

NTSTATUS TapeSetMediaParameters IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

NTSTATUS TapeSetPosition IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 

BOOLEAN TapeVerifyInquiry IN PSCSI_INQUIRY_DATA  LunInfo  ) 
 

NTSTATUS TapeWriteMarks IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp
 


Generated on Sat May 15 19:45:44 2004 for test by doxygen 1.3.7