32#pragma alloc_text(PAGE, Ext2DeviceControl)
33#pragma alloc_text(PAGE, Ext2DeviceControlNormal)
34#pragma alloc_text(PAGE, Ext2ProcessVolumeProperty)
35#pragma alloc_text(PAGE, Ext2ProcessUserProperty)
36#pragma alloc_text(PAGE, Ext2ProcessGlobalProperty)
37#pragma alloc_text(PAGE, Ex2ProcessUserPerfStat)
38#pragma alloc_text(PAGE, Ex2ProcessMountPoint)
40#pragma alloc_text(PAGE, Ext2PrepareToUnload)
56 if (
Irp->PendingReturned) {
95 Irp = IrpContext->Irp;
129 if (!IrpContext->ExceptionInProgress) {
132 IrpContext->Irp =
NULL;
171 GlobalDataResourceAcquired =
TRUE;
174 DEBUG(
DL_ERR, (
"Ext2PrepareUnload: Already ready to unload.\n"));
190 ListEntry = ListEntry->
Flink;
192 if (
Vcb && (!
Vcb->ReferenceCount) &&
204 DEBUG(
DL_ERR, (
"Ext2PrepareUnload: Mounted volumes exists.\n"));
217 DEBUG(
DL_INF, (
"Ext2PrepareToUnload: Driver is ready to unload.\n"));
221 if (GlobalDataResourceAcquired) {
225 if (!IrpContext->ExceptionInProgress) {
301 GlobalDataResourceAcquired =
TRUE;
309 if (Property3->AutoMount)
320 Property2->sHidingPrefix,
326 Property2->sHidingSuffix,
358 if (GlobalDataResourceAcquired) {
383 VcbResourceAcquired =
TRUE;
410 if (Property3->AutoMount)
417 Vcb->uid = Property3->uid;
418 Vcb->gid = Property3->gid;
419 if (Property3->EIDS) {
420 Vcb->euid = Property3->euid;
421 Vcb->egid = Property3->egid;
424 Vcb->euid =
Vcb->egid = 0;
431 Vcb->euid =
Vcb->egid = 0;
474 if (!
Vcb->IsExt3fs) {
476 }
else if (!
Property->bExt3Writable) {
494 if (
Vcb->Codepage.PageTable) {
504 Property3->AutoMount =
TRUE;
507 Property3->AutoMount =
FALSE;
512 Property3->uid =
Vcb->uid;
513 Property3->gid =
Vcb->gid;
515 Property3->EIDS =
TRUE;
516 Property3->euid =
Vcb->euid;
517 Property3->egid =
Vcb->egid;
519 Property3->EIDS =
FALSE;
568 if (
Vcb->Codepage.PageTable) {
582 if (VcbResourceAcquired) {
626 IrpContext->Irp->IoStatus.Information =
Length;
631 if (!IrpContext->ExceptionInProgress) {
681 GlobalDataResourceAcquired =
TRUE;
705 IrpContext->Irp->IoStatus.Information =
Length;
710 if (GlobalDataResourceAcquired) {
714 if (!IrpContext->ExceptionInProgress) {
755 Buffer[12] = MountPoint->Link[0];
757 switch (MountPoint->Command) {
774 if (!IrpContext->ExceptionInProgress) {
796 Irp = IrpContext->Irp;
800 code =
irpSp->Parameters.DeviceIoControl.IoControlCode;
801 length =
irpSp->Parameters.DeviceIoControl.OutputBufferLength;
808 Irp->AssociatedIrp.SystemBuffer,
816 Irp->AssociatedIrp.SystemBuffer,
824 Irp->AssociatedIrp.SystemBuffer,
830 case IOCTL_PREPARE_TO_UNLOAD:
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
#define NT_SUCCESS(StatCode)
NTSTATUS NTAPI CompleteRequest(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
#define APP_CMD_DEL_DOS_SYMLINK
#define IOCTL_APP_MOUNT_POINT
#define EXT2_QUERY_PERFSTAT_SZV1
#define EXT2_APP_MOUNTPOINT_MAGIC
#define APP_CMD_QUERY_VERSION
#define APP_CMD_QUERY_PROPERTY2
#define IOCTL_APP_QUERY_PERFSTAT
struct _EXT2_VOLUME_PROPERTY_VERSION * PEXT2_VOLUME_PROPERTY_VERSION
#define APP_CMD_SET_PROPERTY2
#define IOCTL_APP_VOLUME_PROPERTY
#define EXT2_VPROP3_AUTOMOUNT
#define APP_CMD_SET_PROPERTY3
#define EXT2_QUERY_PERFSTAT_VER2
#define EXT2_VOLUME_PROPERTY_MAGIC
#define EXT2_QUERY_PERFSTAT_SZV2
#define EXT2_FLAG_VP_SET_GLOBAL
#define APP_CMD_QUERY_PROPERTY3
#define EXT2_VPROP3_USERIDS
#define EXT2_QUERY_PERFSTAT_MAGIC
#define APP_CMD_ADD_DOS_SYMLINK
#define APP_CMD_SET_PROPERTY
#define APP_CMD_QUERY_PROPERTY
_In_ PIO_STACK_LOCATION IrpSp
#define IsListEmpty(ListHead)
#define ExAcquireResourceExclusiveLite(res, wait)
#define ExAcquireResourceSharedLite(res, wait)
NTSTATUS Ext2ProcessGlobalProperty(IN PDEVICE_OBJECT DeviceObject, IN PEXT2_VOLUME_PROPERTY3 Property3, IN ULONG Length)
NTSTATUS Ext2DeviceControlNormal(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2ProcessUserProperty(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VOLUME_PROPERTY3 Property, IN ULONG Length)
NTSTATUS Ex2ProcessMountPoint(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_MOUNT_POINT MountPoint, IN ULONG Length)
NTSTATUS Ext2DeviceControlCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
NTSTATUS Ext2ProcessVolumeProperty(IN PEXT2_VCB Vcb, IN PEXT2_VOLUME_PROPERTY3 Property3, IN ULONG Length)
NTSTATUS Ext2DeviceControl(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ex2ProcessUserPerfStat(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_QUERY_PERFSTAT QueryPerf, IN ULONG Length)
NTSTATUS Ext2InitializeLabel(IN PEXT2_VCB Vcb, IN PEXT2_SUPER_BLOCK Sb)
#define ClearFlag(_F, _SF)
VOID Ext2RemoveVcb(PEXT2_VCB Vcb)
#define IsExt2FsDevice(DO)
#define SetLongFlag(_F, _SF)
#define VCB_DISMOUNT_PENDING
#define VCB_JOURNAL_RECOVER
VOID Ext2ClearVpbFlag(IN PVPB Vpb, IN USHORT Flag)
INT Ext2RecoverJournal(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
#define ClearLongFlag(_F, _SF)
VOID Ext2DestroyVcb(IN PEXT2_VCB Vcb)
NTSTATUS Ext2PrepareToUnload(IN PEXT2_IRP_CONTEXT IrpContext)
#define EXT2_UNLOAD_PENDING
struct _EXT2_VCB * PEXT2_VCB
#define VCB_FORCE_WRITING
#define EXT2_SUPPORT_WRITING
#define EXT3_FORCE_WRITING
NTSTATUS Ext2CompleteIrpContext(IN PEXT2_IRP_CONTEXT IrpContext, IN NTSTATUS Status)
NTSTATUS Ext2FlushFiles(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
NTSTATUS Ext2FlushVolume(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
IN OUT PVCB IN PDEVICE_OBJECT TargetDeviceObject
GLuint GLsizei GLsizei * length
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
static DRIVER_UNLOAD DriverUnload
#define memcpy(s1, s2, n)
struct nls_table * load_nls(char *)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
NTSTATUS NTAPI IoCreateSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
NTSTATUS NTAPI IoDeleteSymbolicLink(IN PUNICODE_STRING SymbolicLinkName)
VOID NTAPI IoUnregisterFileSystem(IN PDEVICE_OBJECT DeviceObject)
PDRIVER_UNLOAD DriverUnload
struct _EXT2_GLOBAL::@698 Codepage
PDEVICE_OBJECT DiskdevObject
PDRIVER_OBJECT DriverObject
EXT2_PERF_STATISTICS_V2 PerfStat
CHAR sHidingSuffix[HIDINGPAT_LEN]
CHAR sHidingPrefix[HIDINGPAT_LEN]
PDEVICE_OBJECT CdromdevObject
struct _EXT2_PERF_STATISTICS_V2::@695 Irps[IRP_MJ_MAXIMUM_FUNCTION+1]
CHAR sHidingSuffix[HIDINGPAT_LEN]
CHAR sHidingPrefix[HIDINGPAT_LEN]
struct _LIST_ENTRY * Flink
static PMEM_HOOK PageTable[TOTAL_PAGES]
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
static int Link(const char **args)
_In_ PDEVICE_OBJECT DeviceObject
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)